protected function makeModelInstance($class)
    {
        if ( ! class_exists($class)) {
            throw new UnexpectedValueException("Class '{$class}' does not exist");
        }

        $instance = new $class;

        if ( ! $instance instanceof Model) {
            throw new UnexpectedValueException("Instance of '{$class}' is not a model");
        }

        $this->modelInstance = $instance;

        $this->modelReflection = new ReflectionClass($class);

        return $this;
    }
protected function makeModelInstance($class)
    {
        if ( ! class_exists($class)) {
            throw new UnexpectedValueException("Class '{$class}' does not exist");
        }

        $instance = new $class;

        if ( ! $instance instanceof Model) {
            throw new UnexpectedValueException("Instance of '{$class}' is not a model");
        }

        $this->modelInstance = $instance;

        $this->modelReflection = new ReflectionClass($class);

        return $this;
    }
protected function makeModelInstance ( $ class ) { if ( ! class_exists ( $ class ) ) { throw new UnexpectedValueException ( "Class '{$class}' does not exist" ) ; } $ instance = new $ class ; if ( ! $ instance instanceof Model ) { throw new UnexpectedValueException ( "Instance of '{$class}' is not a model" ) ; } $ this -> modelInstance = $ instance ; $ this -> modelReflection = new ReflectionClass ( $ class ) ; return $ this ; }
Makes and sets instance of the model class and stores it.

@param string $class
@return $this
Makes and sets instance of the model class and stores it .