示例#1
0
文件: ORMWrapper.php 项目: voku/paris
 /**
  * Method to create an instance of the model class
  * associated with this wrapper and populate
  * it with the supplied Idiorm instance.
  *
  * @param ORM $orm
  *
  * @return bool|Model
  */
 protected function _create_model_instance($orm)
 {
     if ($orm === false) {
         return false;
     }
     /* @var $model Model */
     $model = new $this->_class_name();
     /** @noinspection PhpUndefinedMethodInspection */
     $orm->set_class_name($this->_class_name);
     $model->set_orm($orm);
     return $model;
 }