protected function _buildModel($auto_populate = true, $advanced_search = false)
    {
        if (\CarteBlanche\App\Loader::classExists($this->object_model_name)) {
            try {
                $this->object_model = new $this->object_model_name(
                    $this->getTableName(),
                    $this->getFields(),
                    $this->getStructure(),
                    $auto_populate, $advanced_search
                );
                $db = CarteBlanche::getContainer()->get('entity_manager')
                    ->getStorageEngine($this->getDatabaseName());
                $this->object_model->setStorageEngine($db);

            } catch ( \Exception $e ) {
                throw new \Exception(
                    sprintf('Model "%s" constructor seems not compliant with the "\CarteBlanche\Interfaces\ModelInterface" interface!', $this->object_model_name)
                );
            }
        } else {
            trigger_error( sprintf('Model "%s" can\'t be found!', $this->object_model_name), E_USER_ERROR);
        }
    }
protected function _buildModel($auto_populate = true, $advanced_search = false)
    {
        if (\CarteBlanche\App\Loader::classExists($this->object_model_name)) {
            try {
                $this->object_model = new $this->object_model_name(
                    $this->getTableName(),
                    $this->getFields(),
                    $this->getStructure(),
                    $auto_populate, $advanced_search
                );
                $db = CarteBlanche::getContainer()->get('entity_manager')
                    ->getStorageEngine($this->getDatabaseName());
                $this->object_model->setStorageEngine($db);

            } catch ( \Exception $e ) {
                throw new \Exception(
                    sprintf('Model "%s" constructor seems not compliant with the "\CarteBlanche\Interfaces\ModelInterface" interface!', $this->object_model_name)
                );
            }
        } else {
            trigger_error( sprintf('Model "%s" can\'t be found!', $this->object_model_name), E_USER_ERROR);
        }
    }
protected function _buildModel ( $ auto_populate = true , $ advanced_search = false ) { if ( \ CarteBlanche \ App \ Loader :: classExists ( $ this -> object_model_name ) ) { try { $ this -> object_model = new $ this -> object_model_name ( $ this -> getTableName ( ) , $ this -> getFields ( ) , $ this -> getStructure ( ) , $ auto_populate , $ advanced_search ) ; $ db = CarteBlanche :: getContainer ( ) -> get ( 'entity_manager' ) -> getStorageEngine ( $ this -> getDatabaseName ( ) ) ; $ this -> object_model -> setStorageEngine ( $ db ) ; } catch ( \ Exception $ e ) { throw new \ Exception ( sprintf ( 'Model "%s" constructor seems not compliant with the "\CarteBlanche\Interfaces\ModelInterface" interface!' , $ this -> object_model_name ) ) ; } } else { trigger_error ( sprintf ( 'Model "%s" can\'t be found!' , $ this -> object_model_name ) , E_USER_ERROR ) ; } }
Build the object model
@return void
Build the object model