Beispiel #1
0
 public function setUp()
 {
     $schema = new ZFDoctrine_Import_Schema();
     $defaultOptions = $schema->getOptions();
     $this->builder = new ZFDoctrine_Import_Builder();
     $this->builder->setOptions($defaultOptions);
 }
 protected function _createImportSchema()
 {
     $manager = Doctrine_Manager::getInstance();
     $modelLoading = $manager->getAttribute(Doctrine_Core::ATTR_MODEL_LOADING);
     $listener = false;
     $zendStyles = array(ZFDoctrine_Core::MODEL_LOADING_ZEND, ZFDoctrine_Core::MODEL_LOADING_ZEND_SINGLE_LIBRARY, ZFDoctrine_Core::MODEL_LOADING_ZEND_MODULE_LIBRARY);
     if (!in_array($modelLoading, $zendStyles)) {
         $import = new Doctrine_Import_Schema();
     } else {
         $response = $this->_registry->getResponse();
         $listener = new ZFDoctrine_Tool_ResponseImportListener($response);
         $import = new ZFDoctrine_Import_Schema();
         $import->setListener($listener);
     }
     return $import;
 }