Granada\Orm\Wrapper::_create_model_instance PHP Method

_create_model_instance() protected method

Method to create an instance of the model class associated with this wrapper and populate it with the supplied Idiorm instance.
protected _create_model_instance ( $orm )
    protected function _create_model_instance($orm)
    {
        if ($orm === false) {
            return false;
        }
        $model = new $this->_class_name();
        $orm->resultSetClass = $model->get_resultSetClass();
        $orm->set_class_name($this->_class_name);
        $model->set_orm($orm);
        return $model;
    }