获取当前的关联模型类的实例
@access public
@return Model
2133
public function getModel()
    {
        $morphType = $this->morphType;
        $model     = $this->parseModel($this->parent->$morphType);

        return (new $model);
    }
1276516
public function getConfigObject()
    {
        if (!isset($this->_configObject) && !empty($this->config)) {
            $configSettings = json_decode($this->config, true);
            if (isset($configSettings['class'])) {
                $this->_configObject = Yii::createObject($configSettings);
                $this->_configObject->model = $this;
            }
        }

        return $this->_configObject;
    }
576502
public function getPrimaryModel() {
        if ($model = $this->_model) {
            return $model;
        }

        $class = $this->getPrimaryClass();

        if (!$class) {
            return null;
        }

        $this->setPrimaryModel(new $class());

        return $this->_model;
    }
662954
protected function model() : Model
    {
        if (! $this->model) {
            $this->model = $this->option('model') ?? Config::get('ldap_auth.model') ?: $this->determineModel();
        }

        return new $this->model;
    }
1184047
public static function instance()
    {
        if (self::$instance) {
            return self::$instance;
        }

        //set up a proper instance
        self::$instance = new self;

        return self::$instance;
    }
785665
public function get()
    {
        $modelResult = $this->getRequest()->request(
            'GET',
            $this->getRequestUrl('models')
        );

        return $this->getModelsFromResult($modelResult);
    }
1110965
public static function getInstance()
    {
        if(!isset(self::$_instance))
        {
            /** @var User $user */
            $user = Yii::$app->user;
            if(isset($user->authClientConfig) && isset($user->authClientConfig['collection']) && isset($user->authClientConfig['id']))
            {
                /** @var Collection $collection */
                $collection = Yii::$app->get($user->authClientConfig['collection']);
                if($collection->hasClient($user->authClientConfig['id']))
                {
                    self::$_instance = $collection->getClient($user->authClientConfig['id']);
                }
            }
        }

        return self::$_instance;
    }
62587
public function get_model(){
    $args = \func_get_args();
    $die = false;
    foreach ( $args as $a ){
      if ( \is_string($a) ){
        $path = $a;
      }
      else if ( \is_array($a) ){
        $data = $a;
      }
      else if ( \is_bool($a) ){
        $die = $a;
      }
    }
    if ( empty($path) ){
      $path = $this->path;
      if ( ($this->get_mode() === 'dom') && (!defined('BBN_DEFAULT_MODE') || (BBN_DEFAULT_MODE !== 'dom')) ){
        $path .= '/index';
      }
    }
		else if ( strpos($path, './') === 0 ){
			$path = $this->say_dir().substr($path, 1);
		}
    if ( !isset($data) ){
      $data = $this->data;
    }
		$m = $this->mvc->get_model($path, $data, $this);
		if ( \is_object($m) ){
			$m = bbn\x::to_array($m);
		}
    if ( !\is_array($m) ){
			if ( $die ){
				die("$path is an invalid model");
			}
			return [];
    }
    return $m;
	}
1082732
public function getModel() {
        $model = new $this->_options['model']();
        foreach ($this->_options['bindings'] as $binding => $bindingOptions) {
            if (is_numeric($binding)) {
                $model->bindModel($bindingOptions);
            } elseif (is_string($binding)) {
                $model->bindModel($binding, $bindingOptions);
            }
        }
        return $model;
    }
271688
public function getModel()
    {
        if ($this->_model === null && $this->ngRestModelClass !== null) {
            $this->_model = call_user_func_array([$this->ngRestModelClass, 'findOne'], $this->itemIds);
        }
        
        return $this->_model;
    }
976156
public function getValue()
    {
        $value = $this->getModelValue();
        if (is_null($value)) {
            $value = $this->getDefaultValue();
        }

        return $value;
    }
306243
public function model($model)
    {
        #$model = ucfirst($model).'Model';
        $modelPath = self::$instance->app->findModel($model);
        $modelClass = "App\\Model\\".$model;
        $this->model = new $modelClass();
        self::$instance->modelService = new ModelService();
        self::$instance->modelService->initialize(self::$instance->app);
        return $this->model;
        //$appModel->handleModel($controller, $method);
    }
861356
public static function get() {

        $keys = func_get_args();
        $config = self::getConfig();
        $value = $config;

        if (!empty($config) && !empty($keys)) {

            foreach ($keys as $number => $name) {

                if (is_object($value)) {

                    $value = Format::objectToArray($value);
                }

                if ($number == 0 && isset($value[$name])) {

                    $value = $value[$keys[0]];
                } else if ($number != 0 && isset($value[$name])) {

                    $value = $value[$name];
                } else {

                    return false;
                }
            }

            return $value;
        } else if (!empty($config)) {

            return $config;
        }

        return false;
    }
562369
public function getModel(): Model
    {
        $name = $this->getModelName();
        $model = $this->app->make($name);

        if (! $model instanceof Model) {
            throw new InvalidArgumentException("Model [{$name}] should be an instance of Eloquent.");
        }

        $database = $this->getConfig('database');

        if (! \is_null($database)) {
            $model->setConnection($database);
        }

        $model->useWritePdo();

        return $model;
    }
1108680
public function table()
    {
        if(!isset($this->_table))
            $this->_table = $this->_connection->table($this->_tableName);

        return $this->_table;
    }
537523
public function currentConfig(){

        if($this->currentConfig !== false){
            return $this->currentConfig;
        }

        $this->currentConfig = null;

        if(!$pageType = $this->current()){
            return;
        }

        $pageId = null;

        if ($page = $this->getBestMatchingPage($pageType)) {
            $pageId = $page->getIdentifier();
        }

        $this->currentConfig = $this->configRepository->getConfig($pageType, $pageId);

        return $this->currentConfig;
    }
303233
public function getModel()
    {
        if (!$this->model) {
            $this->model = $this->add($this->model_name);
        }
        /** @type Model $this->model */
        if ($this->display_field) {
            $this->model->title_field = $this->display_field;
        }
        if ($this->table_alias) {
            $this->model->table_alias = $this->table_alias;
        }

        return $this->model;
    }