public function getForeignModel()
    {
        $model = $this->getFullForeignModel();

        if ($this->isModel($model)) {
            return class_basename($model);
        }

        $position = strrpos($model, '\\');

        if ($position !== false) {
            return substr($model, $position + 1);
        }

        return '';
    }
public function getForeignModel()
    {
        $model = $this->getFullForeignModel();

        if ($this->isModel($model)) {
            return class_basename($model);
        }

        $position = strrpos($model, '\\');

        if ($position !== false) {
            return substr($model, $position + 1);
        }

        return '';
    }
public function getForeignModel ( ) { $ model = $ this -> getFullForeignModel ( ) ; if ( $ this -> isModel ( $ model ) ) { return class_basename ( $ model ) ; } $ position = strrpos ( $ model , '\\' ) ; if ( $ position !== false ) { return substr ( $ model , $ position + 1 ) ; } return '' ; }
Gets the foreign model name.

@return string
Gets the foreign model name .