private function validate()
    {
        if (empty($this->modelName) && empty($this->model)) {
            throw new Exception\ModelNotSetException();
        }

        if (empty($this->model)) {
            $this->model = new $this->modelName();
        }

        if (empty($this->modelName)) {
            $this->modelName = get_class($this->model);
        }

        if (empty($this->db)) {
            $this->db = $this->model->getConnection();
        }
    }
private function validate()
    {
        if (empty($this->modelName) && empty($this->model)) {
            throw new Exception\ModelNotSetException();
        }

        if (empty($this->model)) {
            $this->model = new $this->modelName();
        }

        if (empty($this->modelName)) {
            $this->modelName = get_class($this->model);
        }

        if (empty($this->db)) {
            $this->db = $this->model->getConnection();
        }
    }
private function validate ( ) { if ( empty ( $ this -> modelName ) && empty ( $ this -> model ) ) { throw new Exception \ ModelNotSetException ( ) ; } if ( empty ( $ this -> model ) ) { $ this -> model = new $ this -> modelName ( ) ; } if ( empty ( $ this -> modelName ) ) { $ this -> modelName = get_class ( $ this -> model ) ; } if ( empty ( $ this -> db ) ) { $ this -> db = $ this -> model -> getConnection ( ) ; } }
Validates model and database

@throws Exception\ModelNotSetException
@internal
Validates model and database