src/EntityCollection.php
public function getModel()
    {
        $namePath = $this->getModelClass();
        $model = new $namePath();

        if (!($model instanceof EntityDataModel)) {
            throw new \Exception($this->valueClass.' is not an instance of EntityModel.');
        }

        return $model;
    }
public function getModel()
    {
        $namePath = $this->getModelClass();
        $model = new $namePath();

        if (!($model instanceof EntityDataModel)) {
            throw new \Exception($this->valueClass.' is not an instance of EntityModel.');
        }

        return $model;
    }
public function getModel ( ) { $ namePath = $ this -> getModelClass ( ) ; $ model = new $ namePath ( ) ; if ( ! ( $ model instanceof EntityDataModel ) ) { throw new \ Exception ( $ this -> valueClass . ' is not an instance of EntityModel.' ) ; } return $ model ; }
Model Factory.

@throws \Exception

@return mixed
Model Factory .