public function setUp()
 {
     if (version_compare(\Doctrine\Common\Version::VERSION, '2.1.0RC4-DEV', '>=')) {
         $this->markTestSkipped('Doctrine common is 2.1.0RC4-DEV version, skipping.');
     } else {
         if (version_compare(\Doctrine\Common\Version::VERSION, '2.1.0-BETA3-DEV', '>=')) {
             $reader = new AnnotationReader();
             $reader->setDefaultAnnotationNamespace('Doctrine\\ORM\\Mapping\\');
             $reader->setIgnoreNotImportedAnnotations(true);
             $reader->setAnnotationNamespaceAlias('Gedmo\\Mapping\\Annotation\\', 'gedmo');
             $reader->setEnableParsePhpImports(false);
             $reader->setAutoloadAnnotations(true);
             $reader = new CachedReader(new \Doctrine\Common\Annotations\IndexedReader($reader), new ArrayCache());
         } else {
             $reader = new AnnotationReader();
             $reader->setAutoloadAnnotations(true);
             $reader->setAnnotationNamespaceAlias('Gedmo\\Mapping\\Annotation\\', 'gedmo');
             $reader->setDefaultAnnotationNamespace('Doctrine\\ORM\\Mapping\\');
         }
     }
     $config = new \Doctrine\ORM\Configuration();
     $config->setProxyDir(TESTS_TEMP_DIR);
     $config->setProxyNamespace('Gedmo\\Mapping\\Proxy');
     $config->setMetadataDriverImpl(new AnnotationDriver($reader));
     $conn = array('driver' => 'pdo_sqlite', 'memory' => true);
     //$config->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger());
     $evm = new \Doctrine\Common\EventManager();
     $this->timestampable = new \Gedmo\Timestampable\TimestampableListener();
     $evm->addEventSubscriber($this->timestampable);
     $this->em = \Doctrine\ORM\EntityManager::create($conn, $config, $evm);
     $schemaTool = new \Doctrine\ORM\Tools\SchemaTool($this->em);
     $schemaTool->dropSchema(array());
     $schemaTool->createSchema(array($this->em->getClassMetadata(self::ARTICLE)));
 }
 protected function getDoctrine_Orm_DefaultEntityManagerService()
 {
     $a = new \Doctrine\Common\Cache\ArrayCache();
     $a->setNamespace('sf2orm_default_a10d301149e084ecdc488926bd33b00804ee0e5e92d7232190c350bbe261b941');
     $b = new \Doctrine\Common\Cache\ArrayCache();
     $b->setNamespace('sf2orm_default_a10d301149e084ecdc488926bd33b00804ee0e5e92d7232190c350bbe261b941');
     $c = new \Doctrine\Common\Cache\ArrayCache();
     $c->setNamespace('sf2orm_default_a10d301149e084ecdc488926bd33b00804ee0e5e92d7232190c350bbe261b941');
     $d = new \Doctrine\ORM\Mapping\Driver\SimplifiedXmlDriver(array('/var/www/html/LetsVolunteer/src/Ridwan/EntityBundle/Resources/config/doctrine' => 'Ridwan\\EntityBundle\\Entity', '/var/www/html/LetsVolunteer/vendor/friendsofsymfony/user-bundle/FOS/UserBundle/Resources/config/doctrine' => 'FOS\\UserBundle\\Entity'));
     $d->setGlobalBasename('mapping');
     $e = new \Doctrine\ORM\Mapping\Driver\DriverChain();
     $e->addDriver($d, 'Ridwan\\EntityBundle\\Entity');
     $e->addDriver($d, 'FOS\\UserBundle\\Entity');
     $f = new \Doctrine\ORM\Configuration();
     $f->setEntityNamespaces(array('RidwanEntityBundle' => 'Ridwan\\EntityBundle\\Entity', 'FOSUserBundle' => 'FOS\\UserBundle\\Entity'));
     $f->setMetadataCacheImpl($a);
     $f->setQueryCacheImpl($b);
     $f->setResultCacheImpl($c);
     $f->setMetadataDriverImpl($e);
     $f->setProxyDir('/var/www/html/LetsVolunteer/app/cache/prod/doctrine/orm/Proxies');
     $f->setProxyNamespace('Proxies');
     $f->setAutoGenerateProxyClasses(false);
     $f->setClassMetadataFactoryName('Doctrine\\ORM\\Mapping\\ClassMetadataFactory');
     $f->setDefaultRepositoryClassName('Doctrine\\ORM\\EntityRepository');
     $f->setNamingStrategy(new \Doctrine\ORM\Mapping\DefaultNamingStrategy());
     $this->services['doctrine.orm.default_entity_manager'] = $instance = \Doctrine\ORM\EntityManager::create($this->get('doctrine.dbal.default_connection'), $f);
     $this->get('doctrine.orm.default_manager_configurator')->configure($instance);
     return $instance;
 }
 protected function getDoctrine_Orm_DefaultEntityManagerService()
 {
     $a = new \Doctrine\Common\Cache\ArrayCache();
     $a->setNamespace('sf2orm_default_4daee9dfb8af5f706c767d9f3ee73fb6');
     $b = new \Doctrine\Common\Cache\ArrayCache();
     $b->setNamespace('sf2orm_default_4daee9dfb8af5f706c767d9f3ee73fb6');
     $c = new \Doctrine\Common\Cache\ArrayCache();
     $c->setNamespace('sf2orm_default_4daee9dfb8af5f706c767d9f3ee73fb6');
     $d = new \Doctrine\ORM\Mapping\Driver\SimplifiedXmlDriver(array('C:\\xampp\\htdocs\\betafinale\\vendor\\friendsofsymfony\\user-bundle\\FOS\\UserBundle\\Resources\\config\\doctrine' => 'FOS\\UserBundle\\Entity'));
     $d->setGlobalBasename('mapping');
     $e = new \Doctrine\ORM\Mapping\Driver\DriverChain();
     $e->addDriver($d, 'FOS\\UserBundle\\Entity');
     $e->addDriver(new \Doctrine\ORM\Mapping\Driver\AnnotationDriver($this->get('annotation_reader'), array(0 => 'C:\\xampp\\htdocs\\betafinale\\src\\Utilisateur\\UtilisateurBundle\\Entity')), 'Utilisateur\\UtilisateurBundle\\Entity');
     $e->addDriver(new \Doctrine\ORM\Mapping\Driver\XmlDriver(new \Doctrine\Common\Persistence\Mapping\Driver\SymfonyFileLocator(array('C:\\xampp\\htdocs\\betafinale\\vendor\\friendsofsymfony\\user-bundle\\FOS\\UserBundle\\Resources\\config\\doctrine\\model' => 'FOS\\UserBundle\\Model'), '.orm.xml')), 'FOS\\UserBundle\\Model');
     $f = new \Doctrine\ORM\Configuration();
     $f->setEntityNamespaces(array('FOSUserBundle' => 'FOS\\UserBundle\\Entity', 'UtilisateurBundle' => 'Utilisateur\\UtilisateurBundle\\Entity'));
     $f->setMetadataCacheImpl($a);
     $f->setQueryCacheImpl($b);
     $f->setResultCacheImpl($c);
     $f->setMetadataDriverImpl($e);
     $f->setProxyDir('C:/xampp/htdocs/betafinale/app/cache/prod/doctrine/orm/Proxies');
     $f->setProxyNamespace('Proxies');
     $f->setAutoGenerateProxyClasses(false);
     $f->setClassMetadataFactoryName('Doctrine\\ORM\\Mapping\\ClassMetadataFactory');
     $f->setDefaultRepositoryClassName('Doctrine\\ORM\\EntityRepository');
     $f->setNamingStrategy(new \Doctrine\ORM\Mapping\DefaultNamingStrategy());
     $this->services['doctrine.orm.default_entity_manager'] = $instance = call_user_func(array('Doctrine\\ORM\\EntityManager', 'create'), $this->get('doctrine.dbal.default_connection'), $f);
     $this->get('doctrine.orm.default_manager_configurator')->configure($instance);
     return $instance;
 }
 protected function getDoctrine_Orm_DefaultEntityManagerService()
 {
     $a = $this->get('annotation_reader');
     $b = new \Doctrine\Common\Cache\ArrayCache();
     $b->setNamespace('sf2orm_default_0b7ea2905c8c334a3198b040659e40a6');
     $c = new \Doctrine\Common\Cache\ArrayCache();
     $c->setNamespace('sf2orm_default_0b7ea2905c8c334a3198b040659e40a6');
     $d = new \Doctrine\Common\Cache\ArrayCache();
     $d->setNamespace('sf2orm_default_0b7ea2905c8c334a3198b040659e40a6');
     $e = new \Doctrine\ORM\Mapping\Driver\AnnotationDriver($a, array(0 => 'C:\\xampp\\htdocs\\ociosos\\src\\Ociosos\\ComunBundle\\Entity', 1 => 'C:\\xampp\\htdocs\\ociosos\\src\\Ociosos\\UsuarioBundle\\Entity', 2 => 'C:\\xampp\\htdocs\\ociosos\\src\\Ociosos\\RodasXMLBundle\\Entity'));
     $f = new \Doctrine\ORM\Mapping\Driver\DriverChain();
     $f->addDriver($e, 'Ociosos\\ComunBundle\\Entity');
     $f->addDriver($e, 'Ociosos\\UsuarioBundle\\Entity');
     $f->addDriver($e, 'Ociosos\\RodasXMLBundle\\Entity');
     $g = new \Doctrine\ORM\Configuration();
     $g->setEntityNamespaces(array('ComunBundle' => 'Ociosos\\ComunBundle\\Entity', 'UsuarioBundle' => 'Ociosos\\UsuarioBundle\\Entity', 'RodasXMLBundle' => 'Ociosos\\RodasXMLBundle\\Entity'));
     $g->setMetadataCacheImpl($b);
     $g->setQueryCacheImpl($c);
     $g->setResultCacheImpl($d);
     $g->setMetadataDriverImpl($f);
     $g->setProxyDir('C:/xampp/htdocs/ociosos/app/cache/prod/doctrine/orm/Proxies');
     $g->setProxyNamespace('Proxies');
     $g->setAutoGenerateProxyClasses(false);
     $g->setClassMetadataFactoryName('Doctrine\\ORM\\Mapping\\ClassMetadataFactory');
     $g->setDefaultRepositoryClassName('Doctrine\\ORM\\EntityRepository');
     $g->setNamingStrategy(new \Doctrine\ORM\Mapping\DefaultNamingStrategy());
     $this->services['doctrine.orm.default_entity_manager'] = $instance = call_user_func(array('Doctrine\\ORM\\EntityManager', 'create'), $this->get('doctrine.dbal.default_connection'), $g);
     $this->get('doctrine.orm.default_manager_configurator')->configure($instance);
     return $instance;
 }
示例#5
0
 /**
  * Factory method which creates an EntityManager.
  *
  * @return \Doctrine\ORM\EntityManager
  */
 public function create()
 {
     $config = new \Doctrine\ORM\Configuration();
     $config->setClassMetadataFactoryName('TYPO3\\FLOW3\\Persistence\\Doctrine\\Mapping\\ClassMetadataFactory');
     if (class_exists($this->settings['doctrine']['cacheImplementation'])) {
         // safeguard against apc being disabled in CLI...
         if ($this->settings['doctrine']['cacheImplementation'] !== 'Doctrine\\Common\\Cache\\ApcCache' || function_exists('apc_fetch')) {
             $cache = new $this->settings['doctrine']['cacheImplementation']();
             $config->setMetadataCacheImpl($cache);
             $config->setQueryCacheImpl($cache);
         }
     }
     if (class_exists($this->settings['doctrine']['sqlLogger'])) {
         $config->setSQLLogger(new $this->settings['doctrine']['sqlLogger']());
     }
     // must use ObjectManager in compile phase...
     $flow3AnnotationDriver = $this->objectManager->get('TYPO3\\FLOW3\\Persistence\\Doctrine\\Mapping\\Driver\\Flow3AnnotationDriver');
     $config->setMetadataDriverImpl($flow3AnnotationDriver);
     $proxyDirectory = \TYPO3\FLOW3\Utility\Files::concatenatePaths(array($this->environment->getPathToTemporaryDirectory(), 'Doctrine/Proxies'));
     \TYPO3\FLOW3\Utility\Files::createDirectoryRecursively($proxyDirectory);
     $config->setProxyDir($proxyDirectory);
     $config->setProxyNamespace('TYPO3\\FLOW3\\Persistence\\Doctrine\\Proxies');
     $config->setAutoGenerateProxyClasses(FALSE);
     $entityManager = \Doctrine\ORM\EntityManager::create($this->settings['backendOptions'], $config);
     $flow3AnnotationDriver->setEntityManager($entityManager);
     return $entityManager;
 }
示例#6
0
 public function testConfigureFilter()
 {
     $config = new \Doctrine\ORM\Configuration();
     $config->addFilter("locale", "\\Doctrine\\Tests\\ORM\\Functional\\MyLocaleFilter");
     $this->assertEquals("\\Doctrine\\Tests\\ORM\\Functional\\MyLocaleFilter", $config->getFilterClassName("locale"));
     $this->assertNull($config->getFilterClassName("foo"));
 }
示例#7
0
 /**
  * Creates an entity manager to use for all tests
  *
  * @return Doctrine\ORM\EntityManager
  */
 protected function _createEntityManager()
 {
     $conn = \Doctrine\DBAL\DriverManager::getConnection(array('driver' => 'pdo_sqlite', 'memory' => true));
     $config = new \Doctrine\ORM\Configuration();
     $config->setProxyDir(__DIR__ . '/../Proxies');
     $config->setProxyNamespace('DoctrineExtensions\\NestedSet\\Tests\\Proxies');
     $config->setMetadataDriverImpl(\Doctrine\ORM\Mapping\Driver\AnnotationDriver::create());
     return \Doctrine\ORM\EntityManager::create($conn, $config);
 }
 protected function getQueryBuilder()
 {
     $config = new \Doctrine\ORM\Configuration();
     $config->setProxyDir(\sys_get_temp_dir());
     $config->setProxyNamespace('KunstmaanTests\\Proxy');
     $config->setMetadataDriverImpl(new AnnotationDriver(new AnnotationReader()));
     $params = array('driver' => 'pdo_sqlite', 'memory' => true);
     $em = \Doctrine\ORM\EntityManager::create($params, $config);
     return new QueryBuilder($em);
 }
 private function init()
 {
     if (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers())) {
         \PHPUnit_Framework_TestCase::markTestSkipped('This test requires SQLite support in your environment');
     }
     $config = new \Doctrine\ORM\Configuration();
     $config->setEntityNamespaces(array('UebbHateoasBundle' => 'uebb\\HateoasBundle\\Tests\\Entity'));
     $config->setAutoGenerateProxyClasses(true);
     $config->setProxyDir(\sys_get_temp_dir());
     $config->setProxyNamespace('UebbHateoasTests\\Doctrine');
     $reader = new AnnotationReader();
     $metadataDriver = new AnnotationDriver($reader, 'uebb\\HateoasBundle\\Tests\\Entity');
     $config->setMetadataDriverImpl($metadataDriver);
     $config->setQueryCacheImpl(new \Doctrine\Common\Cache\ArrayCache());
     $config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache());
     $params = array('driver' => 'pdo_sqlite', 'memory' => true);
     $this->entityManager = EntityManager::create($params, $config);
     $this->linkParser = $this->getMock('uebb\\HateoasBundle\\Service\\LinkParserInterface');
     $this->linkResolver = $this->getMock('uebb\\HateoasBundle\\Service\\LinkResolverInterface');
     $this->dispatcher = $this->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface');
     $this->formResolver = new FormResolver($this->factory, $reader);
     $this->queryParser = $this->getMock('uebb\\HateoasBundle\\Service\\QueryParserInterface');
     $this->serializer = $this->getMock('JMS\\Serializer\\SerializerInterface');
     $this->validator = $this->getMock('Symfony\\Component\\Validator\\Validator\\ValidatorInterface');
     $this->requestProcessor = new RequestProcessor($this->entityManager, $this->linkParser, $this->linkResolver, $this->formResolver, $this->dispatcher, $this->queryParser, $this->serializer, $this->validator);
 }
示例#10
0
 protected function getDoctrine_Orm_DefaultEntityManagerService()
 {
     $a = new \Doctrine\Common\Cache\ArrayCache();
     $a->setNamespace('sf2orm_default_8d769ce4aa22abd637c7b7052818602e040efc33d69a70ac4544342291b37ba8');
     $b = new \Doctrine\Common\Cache\ArrayCache();
     $b->setNamespace('sf2orm_default_8d769ce4aa22abd637c7b7052818602e040efc33d69a70ac4544342291b37ba8');
     $c = new \Doctrine\Common\Cache\ArrayCache();
     $c->setNamespace('sf2orm_default_8d769ce4aa22abd637c7b7052818602e040efc33d69a70ac4544342291b37ba8');
     $d = new \Doctrine\ORM\Mapping\Driver\DriverChain();
     $d->addDriver(new \Doctrine\ORM\Mapping\Driver\AnnotationDriver($this->get('annotation_reader'), array(0 => '/home/iker/symfony2/marca/src/uni/bundle/marcaBundle/Entity')), 'uni\\bundle\\marcaBundle\\Entity');
     $e = new \Doctrine\ORM\Configuration();
     $e->setEntityNamespaces(array('uniMarcaBundle' => 'uni\\bundle\\marcaBundle\\Entity'));
     $e->setMetadataCacheImpl($a);
     $e->setQueryCacheImpl($b);
     $e->setResultCacheImpl($c);
     $e->setMetadataDriverImpl($d);
     $e->setProxyDir('/home/iker/symfony2/marca/app/cache/prod/doctrine/orm/Proxies');
     $e->setProxyNamespace('Proxies');
     $e->setAutoGenerateProxyClasses(false);
     $e->setClassMetadataFactoryName('Doctrine\\ORM\\Mapping\\ClassMetadataFactory');
     $e->setDefaultRepositoryClassName('Doctrine\\ORM\\EntityRepository');
     $e->setNamingStrategy(new \Doctrine\ORM\Mapping\DefaultNamingStrategy());
     $this->services['doctrine.orm.default_entity_manager'] = $instance = \Doctrine\ORM\EntityManager::create($this->get('doctrine.dbal.default_connection'), $e);
     $this->get('doctrine.orm.default_manager_configurator')->configure($instance);
     return $instance;
 }
示例#11
0
 /**
  * {@inheritdoc}
  */
 public function register(\Silex\Application $app)
 {
     $app['annotation.reader.internal'] = $app->share(function () use($app) {
         return new \Doctrine\Common\Annotations\AnnotationReader();
     });
     $app['annotation.reader'] = $app->share(function () use($app) {
         return new \Doctrine\Common\Annotations\CachedReader($app['annotation.reader.internal'], $app['app.cache']);
     });
     $app['orm.config.annotation.driver'] = $app->share(function () use($app) {
         return new \Doctrine\ORM\Mapping\Driver\AnnotationDriver($app['annotation.reader'], array(__DIR__ . '/Organizations'));
     });
     $app['orm.config'] = $app->share(function () use($app) {
         $config = new \Doctrine\ORM\Configuration();
         $config->setMetadataCacheImpl($app['app.cache']);
         $config->setResultCacheImpl($app['app.cache']);
         $config->setQueryCacheImpl($app['app.cache']);
         $config->setProxyDir($app['db.orm.proxies_dir']);
         $config->setProxyNamespace($app['db.orm.proxies_namespace']);
         $config->setAutoGenerateProxyClasses($app['db.orm.auto_generate_proxies']);
         $config->setMetadataDriverImpl($app['orm.config.annotation.driver']);
         return $config;
     });
     $app['orm.em'] = $app->share(function () use($app) {
         return \Doctrine\ORM\EntityManager::create($app['db'], $app['orm.config'], $app['db.event_manager']);
     });
 }
示例#12
0
文件: Repository.php 项目: kj187/LEA
 /**
  * Initialize doctrine
  *
  * @return void
  */
 protected function initializeDoctrine()
 {
     $doctrineConfiguration = new \Doctrine\ORM\Configuration();
     // Proxy configuration
     $doctrineConfiguration->setProxyDir(ROOT . 'Data/Proxies/Doctrine/');
     $doctrineConfiguration->setProxyNamespace('LEA\\Proxies');
     $doctrineConfiguration->setAutoGenerateProxyClasses(APPLICATION_CONTEXT == 'development');
     // Mapping Configuration
     //$driverImpl = new Doctrine\ORM\Mapping\Driver\XmlDriver(__DIR__."/config/mappings/xml");
     //$driverImpl = new Doctrine\ORM\Mapping\Driver\XmlDriver(__DIR__."/config/mappings/yml");
     $driverImpl = $doctrineConfiguration->newDefaultAnnotationDriver(ROOT . 'Application/Domain/Model/');
     $doctrineConfiguration->setMetadataDriverImpl($driverImpl);
     // Caching Configuration
     //if (APPLICATION_CONTEXT == 'development') {
     $cache = new \Doctrine\Common\Cache\ArrayCache();
     //} else {
     //    $cache = new \Doctrine\Common\Cache\ApcCache();
     //}
     $doctrineConfiguration->setMetadataCacheImpl($cache);
     $doctrineConfiguration->setQueryCacheImpl($cache);
     // database configuration parameters
     $conn = array('driver' => $this->configuration['database']['driver'], 'user' => $this->configuration['database']['username'], 'password' => $this->configuration['database']['password'], 'dbname' => $this->configuration['database']['dbname'], 'host' => $this->configuration['database']['host']);
     // obtaining the entity manager
     $evm = new \Doctrine\Common\EventManager();
     $this->entityManager = \Doctrine\ORM\EntityManager::create($conn, $doctrineConfiguration, $evm);
 }
 protected function getDoctrine_Orm_DefaultEntityManagerService()
 {
     $a = new \Doctrine\Common\Cache\ArrayCache();
     $a->setNamespace('sf2orm_default_34fb07f8c5c30a0161dab82f751c8632e441929962e443e4f0acfa325886b164');
     $b = new \Doctrine\Common\Cache\ArrayCache();
     $b->setNamespace('sf2orm_default_34fb07f8c5c30a0161dab82f751c8632e441929962e443e4f0acfa325886b164');
     $c = new \Doctrine\Common\Cache\ArrayCache();
     $c->setNamespace('sf2orm_default_34fb07f8c5c30a0161dab82f751c8632e441929962e443e4f0acfa325886b164');
     $d = new \Doctrine\ORM\Mapping\Driver\DriverChain();
     $d->addDriver(new \Doctrine\ORM\Mapping\Driver\AnnotationDriver($this->get('annotation_reader'), array(0 => '/home/itziar/web/synfony2/recetas/src/uni/bundle/recetasBundle/Entity')), 'uni\\bundle\\recetasBundle\\Entity');
     $e = new \Doctrine\ORM\Configuration();
     $e->setEntityNamespaces(array('uniRecetasBundle' => 'uni\\bundle\\recetasBundle\\Entity'));
     $e->setMetadataCacheImpl($a);
     $e->setQueryCacheImpl($b);
     $e->setResultCacheImpl($c);
     $e->setMetadataDriverImpl($d);
     $e->setProxyDir('/home/itziar/web/synfony2/recetas/app/cache/prod/doctrine/orm/Proxies');
     $e->setProxyNamespace('Proxies');
     $e->setAutoGenerateProxyClasses(false);
     $e->setClassMetadataFactoryName('Doctrine\\ORM\\Mapping\\ClassMetadataFactory');
     $e->setDefaultRepositoryClassName('Doctrine\\ORM\\EntityRepository');
     $e->setNamingStrategy(new \Doctrine\ORM\Mapping\DefaultNamingStrategy());
     $this->services['doctrine.orm.default_entity_manager'] = $instance = \Doctrine\ORM\EntityManager::create($this->get('doctrine.dbal.default_connection'), $e);
     $this->get('doctrine.orm.default_manager_configurator')->configure($instance);
     return $instance;
 }
示例#14
0
 protected function getDoctrine_Orm_DefaultEntityManagerService()
 {
     $a = new \Doctrine\Common\Cache\ArrayCache();
     $a->setNamespace('sf2orm_default_212f582878cf7474c20ecc1bd0f75efb89c7ef7c7a33110da091960837c6c845');
     $b = new \Doctrine\Common\Cache\ArrayCache();
     $b->setNamespace('sf2orm_default_212f582878cf7474c20ecc1bd0f75efb89c7ef7c7a33110da091960837c6c845');
     $c = new \Doctrine\Common\Cache\ArrayCache();
     $c->setNamespace('sf2orm_default_212f582878cf7474c20ecc1bd0f75efb89c7ef7c7a33110da091960837c6c845');
     $d = new \Doctrine\ORM\Mapping\Driver\DriverChain();
     $d->addDriver(new \Doctrine\ORM\Mapping\Driver\AnnotationDriver($this->get('annotation_reader'), array(0 => '/home/andoni/symfony2/Marca/src/Uni/Bundle/MarcaBundle/Entity')), 'Uni\\Bundle\\MarcaBundle\\Entity');
     $e = new \Doctrine\ORM\Configuration();
     $e->setEntityNamespaces(array('uniMarcaBundle' => 'Uni\\Bundle\\MarcaBundle\\Entity'));
     $e->setMetadataCacheImpl($a);
     $e->setQueryCacheImpl($b);
     $e->setResultCacheImpl($c);
     $e->setMetadataDriverImpl($d);
     $e->setProxyDir('/home/andoni/symfony2/Marca/app/cache/prod/doctrine/orm/Proxies');
     $e->setProxyNamespace('Proxies');
     $e->setAutoGenerateProxyClasses(false);
     $e->setClassMetadataFactoryName('Doctrine\\ORM\\Mapping\\ClassMetadataFactory');
     $e->setDefaultRepositoryClassName('Doctrine\\ORM\\EntityRepository');
     $e->setNamingStrategy(new \Doctrine\ORM\Mapping\DefaultNamingStrategy());
     $this->services['doctrine.orm.default_entity_manager'] = $instance = \Doctrine\ORM\EntityManager::create($this->get('doctrine.dbal.default_connection'), $e);
     $this->get('doctrine.orm.default_manager_configurator')->configure($instance);
     return $instance;
 }
 protected function getDoctrine_Orm_DefaultEntityManagerService()
 {
     $a = new \Doctrine\Common\Cache\ArrayCache();
     $a->setNamespace('sf2orm_default_d8b0087a585fd8d1a917703a03663dadd0fbb62170bcdd10b61d3f5a3b162bd9');
     $b = new \Doctrine\Common\Cache\ArrayCache();
     $b->setNamespace('sf2orm_default_d8b0087a585fd8d1a917703a03663dadd0fbb62170bcdd10b61d3f5a3b162bd9');
     $c = new \Doctrine\Common\Cache\ArrayCache();
     $c->setNamespace('sf2orm_default_d8b0087a585fd8d1a917703a03663dadd0fbb62170bcdd10b61d3f5a3b162bd9');
     $d = new \Doctrine\ORM\Mapping\Driver\DriverChain();
     $d->addDriver(new \Doctrine\ORM\Mapping\Driver\AnnotationDriver($this->get('annotation_reader'), array(0 => '/home/ivan/symfony2/juegos/src/uniJuegos/Bundle/Entity')), 'uniJuegos\\Bundle\\Entity');
     $e = new \Doctrine\ORM\Configuration();
     $e->setEntityNamespaces(array('uniJuegosBundle' => 'uniJuegos\\Bundle\\Entity'));
     $e->setMetadataCacheImpl($a);
     $e->setQueryCacheImpl($b);
     $e->setResultCacheImpl($c);
     $e->setMetadataDriverImpl($d);
     $e->setProxyDir('/home/ivan/symfony2/juegos/app/cache/prod/doctrine/orm/Proxies');
     $e->setProxyNamespace('Proxies');
     $e->setAutoGenerateProxyClasses(false);
     $e->setClassMetadataFactoryName('Doctrine\\ORM\\Mapping\\ClassMetadataFactory');
     $e->setDefaultRepositoryClassName('Doctrine\\ORM\\EntityRepository');
     $e->setNamingStrategy(new \Doctrine\ORM\Mapping\DefaultNamingStrategy());
     $this->services['doctrine.orm.default_entity_manager'] = $instance = \Doctrine\ORM\EntityManager::create($this->get('doctrine.dbal.default_connection'), $e);
     $this->get('doctrine.orm.default_manager_configurator')->configure($instance);
     return $instance;
 }
 protected function getDoctrine_Orm_DefaultEntityManagerService()
 {
     $a = new \Doctrine\Common\Cache\ArrayCache();
     $a->setNamespace('sf2orm_default_009ddab573918805ac10dd8e02df21ad9f522de9b39f898aae553f354da1859d');
     $b = new \Doctrine\Common\Cache\ArrayCache();
     $b->setNamespace('sf2orm_default_009ddab573918805ac10dd8e02df21ad9f522de9b39f898aae553f354da1859d');
     $c = new \Doctrine\Common\Cache\ArrayCache();
     $c->setNamespace('sf2orm_default_009ddab573918805ac10dd8e02df21ad9f522de9b39f898aae553f354da1859d');
     $d = new \Doctrine\ORM\Mapping\Driver\DriverChain();
     $d->addDriver(new \Doctrine\ORM\Mapping\Driver\AnnotationDriver($this->get('annotation_reader'), array(0 => '/home/haritz/symfony2/marca/src/uni/bundle/marcaBundle/Entity')), 'uni\\bundle\\marcaBundle\\Entity');
     $e = new \Doctrine\ORM\Configuration();
     $e->setEntityNamespaces(array('uniMarcaBundle' => 'uni\\bundle\\marcaBundle\\Entity'));
     $e->setMetadataCacheImpl($a);
     $e->setQueryCacheImpl($b);
     $e->setResultCacheImpl($c);
     $e->setMetadataDriverImpl($d);
     $e->setProxyDir('/home/haritz/symfony2/marca/app/cache/prod/doctrine/orm/Proxies');
     $e->setProxyNamespace('Proxies');
     $e->setAutoGenerateProxyClasses(false);
     $e->setClassMetadataFactoryName('Doctrine\\ORM\\Mapping\\ClassMetadataFactory');
     $e->setDefaultRepositoryClassName('Doctrine\\ORM\\EntityRepository');
     $e->setNamingStrategy(new \Doctrine\ORM\Mapping\DefaultNamingStrategy());
     $this->services['doctrine.orm.default_entity_manager'] = $instance = \Doctrine\ORM\EntityManager::create($this->get('doctrine.dbal.default_connection'), $e);
     $this->get('doctrine.orm.default_manager_configurator')->configure($instance);
     return $instance;
 }
示例#17
0
 /**
  * Initialize Doctrine
  * @return Doctrine_Manager
  */
 public function _initDoctrine()
 {
     // include and register Doctrine's class loader
     require_once 'Doctrine/Common/ClassLoader.php';
     $classLoader = new \Doctrine\Common\ClassLoader('Doctrine', APPLICATION_PATH . '/../library/');
     $classLoader->register();
     // create the Doctrine configuration
     $config = new \Doctrine\ORM\Configuration();
     // setting the cache ( to ArrayCache. Take a look at
     // the Doctrine manual for different options ! )
     $cache = new \Doctrine\Common\Cache\ArrayCache();
     $config->setMetadataCacheImpl($cache);
     $config->setQueryCacheImpl($cache);
     // choosing the driver for our database schema
     // we'll use annotations
     $driver = $config->newDefaultAnnotationDriver(APPLICATION_PATH . '/models');
     $config->setMetadataDriverImpl($driver);
     // set the proxy dir and set some options
     $config->setProxyDir(APPLICATION_PATH . '/models/Proxies');
     $config->setAutoGenerateProxyClasses(true);
     $config->setProxyNamespace('App\\Proxies');
     // now create the entity manager and use the connection
     // settings we defined in our application.ini
     $connectionSettings = $this->getOption('doctrine');
     $conn = array('driver' => $connectionSettings['conn']['driv'], 'user' => $connectionSettings['conn']['user'], 'password' => $connectionSettings['conn']['pass'], 'dbname' => $connectionSettings['conn']['dbname'], 'host' => $connectionSettings['conn']['host']);
     $entityManager = \Doctrine\ORM\EntityManager::create($conn, $config);
     // push the entity manager into our registry for later use
     $registry = Zend_Registry::getInstance();
     $registry->entitymanager = $entityManager;
     return $entityManager;
 }
示例#18
0
 public static function _init_manager($connection)
 {
     $settings = static::connection_settings($connection);
     $config = new \Doctrine\ORM\Configuration();
     $cache = static::_init_cache($settings);
     if ($cache) {
         $config->setMetadataCacheImpl($cache);
         $config->setQueryCacheImpl($cache);
         $config->setResultCacheImpl($cache);
     }
     $config->setProxyDir($settings['proxy_dir']);
     $config->setProxyNamespace($settings['proxy_namespace']);
     $config->setAutoGenerateProxyClasses(\Arr::get($settings, 'auto_generate_proxy_classes', false));
     $config->setMetadataDriverImpl(static::_init_metadata($config, $settings));
     $EventManager = new \Doctrine\Common\EventManager();
     static::$_managers[$connection] = \Doctrine\ORM\EntityManager::create($settings['connection'], $config, $EventManager);
     if (!empty($settings['profiling'])) {
         static::$_managers[$connection]->getConnection()->getConfiguration()->setSQLLogger(new Doctrine\Logger($connection));
     }
     // Connection init callback
     if (!empty($settings['init_callback'])) {
         // If array merge combined this numeric array, grab last two array elements as the real callback
         if (is_array($settings['init_callback']) && count($settings['init_callback']) > 2) {
             $settings['init_callback'] = array_slice($settings['init_callback'], -2);
         }
         call_user_func($settings['init_callback'], static::$_managers[$connection], $connection);
     }
 }
 protected function getDoctrine_Orm_DefaultEntityManagerService()
 {
     $a = new \Doctrine\Common\Cache\ArrayCache();
     $a->setNamespace('sf2orm_default_9d968dc3678c378fa217a1250471e79fb7e4263cf64827a5f1c8cd74fdb740d9');
     $b = new \Doctrine\Common\Cache\ArrayCache();
     $b->setNamespace('sf2orm_default_9d968dc3678c378fa217a1250471e79fb7e4263cf64827a5f1c8cd74fdb740d9');
     $c = new \Doctrine\Common\Cache\ArrayCache();
     $c->setNamespace('sf2orm_default_9d968dc3678c378fa217a1250471e79fb7e4263cf64827a5f1c8cd74fdb740d9');
     $d = new \Doctrine\ORM\Mapping\Driver\DriverChain();
     $d->addDriver(new \Doctrine\ORM\Mapping\Driver\AnnotationDriver($this->get('annotation_reader'), array(0 => '/home/itziar/web/synfony2/itziar-superheroes/src/uni/bundle/superhBundle/Entity')), 'uni\\bundle\\superhBundle\\Entity');
     $e = new \Doctrine\ORM\Configuration();
     $e->setEntityNamespaces(array('uniSuperhBundle' => 'uni\\bundle\\superhBundle\\Entity'));
     $e->setMetadataCacheImpl($a);
     $e->setQueryCacheImpl($b);
     $e->setResultCacheImpl($c);
     $e->setMetadataDriverImpl($d);
     $e->setProxyDir('/home/itziar/web/synfony2/itziar-superheroes/app/cache/prod/doctrine/orm/Proxies');
     $e->setProxyNamespace('Proxies');
     $e->setAutoGenerateProxyClasses(false);
     $e->setClassMetadataFactoryName('Doctrine\\ORM\\Mapping\\ClassMetadataFactory');
     $e->setDefaultRepositoryClassName('Doctrine\\ORM\\EntityRepository');
     $e->setNamingStrategy(new \Doctrine\ORM\Mapping\DefaultNamingStrategy());
     $this->services['doctrine.orm.default_entity_manager'] = $instance = \Doctrine\ORM\EntityManager::create($this->get('doctrine.dbal.default_connection'), $e);
     $this->get('doctrine.orm.default_manager_configurator')->configure($instance);
     return $instance;
 }
示例#20
0
 /**
  * @return \FS\SolrBundle\Doctrine\Mapper\MetaInformationFactory
  */
 private function setupMetaInformationFactory()
 {
     $ormConfiguration = new Doctrine\ORM\Configuration();
     $ormConfiguration->addEntityNamespace('FSTest:ValidTestEntity', 'FS\\SolrBundle\\Tests\\Doctrine\\Mapper');
     $knowNamespaces = new \FS\SolrBundle\Doctrine\ClassnameResolver\KnownNamespaceAliases();
     $knowNamespaces->addEntityNamespaces($ormConfiguration);
     $classnameResolver = new \FS\SolrBundle\Doctrine\ClassnameResolver\ClassnameResolver($knowNamespaces);
     $metaFactory = new \FS\SolrBundle\Doctrine\Mapper\MetaInformationFactory();
     $metaFactory->setClassnameResolver($classnameResolver);
     return $metaFactory;
 }
示例#21
0
 /**
  * Creates an EntityManager for testing purposes.
  * 
  * NOTE: The created EntityManager will have its dependant DBAL parts completely
  * mocked out using a DriverMock, ConnectionMock, etc. These mocks can then
  * be configured in the tests to simulate the DBAL behavior that is desired
  * for a particular test,
  *
  * @return Doctrine\ORM\EntityManager
  */
 protected function _getTestEntityManager($conn = null, $conf = null, $eventManager = null)
 {
     $config = new \Doctrine\ORM\Configuration();
     $config->setMetadataCacheImpl(self::getSharedMetadataCacheImpl());
     $config->setQueryCacheImpl(self::getSharedQueryCacheImpl());
     $eventManager = new \Doctrine\Common\EventManager();
     if ($conn === null) {
         $conn = array('driverClass' => 'Doctrine\\Tests\\Mocks\\DriverMock', 'wrapperClass' => 'Doctrine\\Tests\\Mocks\\ConnectionMock', 'user' => 'john', 'password' => 'wayne');
     }
     return \Doctrine\ORM\EntityManager::create($conn, $config, $eventManager);
 }
 protected function _createEntityManager($metadataDriver)
 {
     $driverMock = new DriverMock();
     $config = new \Doctrine\ORM\Configuration();
     $config->setProxyDir(__DIR__ . '/../../Proxies');
     $config->setProxyNamespace('Doctrine\\Tests\\Proxies');
     $eventManager = new EventManager();
     $conn = new ConnectionMock(array(), $driverMock, $config, $eventManager);
     $mockDriver = new MetadataDriverMock();
     $config->setMetadataDriverImpl($metadataDriver);
     return EntityManagerMock::create($conn, $config, $eventManager);
 }
 public function setUp()
 {
     $config = new \Doctrine\ORM\Configuration();
     $config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache());
     $config->setQueryCacheImpl(new \Doctrine\Common\Cache\ArrayCache());
     $config->setProxyDir(__DIR__ . '/Proxies');
     $config->setProxyNamespace('DoctrineExtensions\\Tests\\Proxies');
     $config->setAutoGenerateProxyClasses(true);
     $config->setMetadataDriverImpl($config->newDefaultAnnotationDriver(__DIR__ . '/../Entities'));
     $config->setCustomStringFunctions(array('LISTAGG' => 'DoctrineExtensions\\Query\\Oracle\\Listagg'));
     $this->entityManager = \Doctrine\ORM\EntityManager::create(array('driver' => 'pdo_sqlite', 'memory' => true), $config);
 }
示例#24
0
 /**
  * Mock factory method to create an EntityManager.
  *
  * @param unknown_type $conn
  * @param unknown_type $name
  * @param Doctrine_Configuration $config
  * @param Doctrine_EventManager $eventManager
  * @return Doctrine\ORM\EntityManager
  */
 public static function create($conn, \Doctrine\ORM\Configuration $config = null, \Doctrine\Common\EventManager $eventManager = null)
 {
     if (is_null($config)) {
         $config = new \Doctrine\ORM\Configuration();
         $config->setProxyDir(__DIR__ . '/../Proxies');
         $config->setProxyNamespace('Doctrine\\Tests\\Proxies');
     }
     if (is_null($eventManager)) {
         $eventManager = new \Doctrine\Common\EventManager();
     }
     return new EntityManagerMock($conn, $config, $eventManager);
 }
 public function setUp()
 {
     $config = new \Doctrine\ORM\Configuration();
     $config->setProxyDir(TESTS_TEMP_DIR);
     $config->setProxyNamespace('Gedmo\\Mapping\\Proxy');
     $config->setMetadataDriverImpl(new \Doctrine\ORM\Mapping\Driver\AnnotationDriver($_ENV['annotation_reader']));
     $conn = array('driver' => 'pdo_sqlite', 'memory' => true);
     $evm = new \Doctrine\Common\EventManager();
     $this->timestampable = new \Gedmo\Timestampable\TimestampableListener();
     $this->timestampable->setAnnotationReader($_ENV['annotation_reader']);
     $evm->addEventSubscriber($this->timestampable);
     $this->em = \Doctrine\ORM\EntityManager::create($conn, $config, $evm);
 }
示例#26
0
 /**
  * Mock factory method to create an EntityManager.
  *
  * {@inheritdoc}
  */
 public static function create($conn, \Doctrine\ORM\Configuration $config = null, \Doctrine\Common\EventManager $eventManager = null)
 {
     if (null === $config) {
         $config = new \Doctrine\ORM\Configuration();
         $config->setProxyDir(__DIR__ . '/../Proxies');
         $config->setProxyNamespace('Doctrine\\Tests\\Proxies');
         $config->setMetadataDriverImpl($config->newDefaultAnnotationDriver(array(), true));
     }
     if (null === $eventManager) {
         $eventManager = new \Doctrine\Common\EventManager();
     }
     return new EntityManagerMock($conn, $config, $eventManager);
 }
 public function setUp()
 {
     $config = new \Doctrine\ORM\Configuration();
     $config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache());
     $config->setQueryCacheImpl(new \Doctrine\Common\Cache\ArrayCache());
     $config->setProxyDir(__DIR__ . '/_files');
     $config->setProxyNamespace('DoctrineExtensions\\LargeCollections\\Proxies');
     $config->setMetadataDriverImpl($config->newDefaultAnnotationDriver());
     $conn = array('driver' => 'pdo_sqlite', 'memory' => true);
     #$config->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger());
     $this->em = \Doctrine\ORM\EntityManager::create($conn, $config);
     $schemaTool = new \Doctrine\ORM\Tools\SchemaTool($this->em);
     $schemaTool->createSchema(array($this->em->getClassMetadata('DoctrineExtensions\\LargeCollections\\Article'), $this->em->getClassMetadata('DoctrineExtensions\\LargeCollections\\Tag'), $this->em->getClassMetadata('DoctrineExtensions\\LargeCollections\\Comment')));
     $article = new Article();
     $tag1 = new Tag();
     $tag2 = new Tag();
     $comment1 = new Comment();
     $comment2 = new Comment();
     $article->addComment($comment1);
     $article->addComment($comment2);
     $article->addTag($tag1);
     $article->addTag($tag2);
     $this->em->persist($article);
     $this->em->persist($tag1);
     $this->em->persist($tag2);
     $this->em->persist($comment1);
     $this->em->persist($comment2);
     $this->em->flush();
     $this->articleId = $article->id();
     $this->em->clear();
 }
 public function init()
 {
     $bootstrapOptions = $this->getBootstrap()->getOptions();
     $options = $this->getOptions();
     $memcache = null;
     $doctrineConfig = new \Doctrine\ORM\Configuration();
     if (!empty($options['options']['metadataCache'])) {
         $metaCache = new $options['options']['metadataCache']();
         if ($metaCache instanceof \Doctrine\Common\Cache\MemcacheCache) {
             $memcache = new Memcache();
             $memcache->connect('localhost', 11211);
             $metaCache->setMemcache($memcache);
         }
         $doctrineConfig->setMetadataCacheImpl($metaCache);
     }
     if (!empty($options['options']['queryCache'])) {
         $queryCache = new $options['options']['queryCache']();
         if ($queryCache instanceof \Doctrine\Common\Cache\MemcacheCache) {
             if (is_null($memcache)) {
                 $memcache = new Memcache();
                 $memcache->connect('localhost', 11211);
             }
             $queryCache->setMemcache($memcache);
         }
         $doctrineConfig->setQueryCacheImpl($queryCache);
     }
     $driverImpl = $doctrineConfig->newDefaultAnnotationDriver(array($options['paths']['entities']));
     $doctrineConfig->setMetadataDriverImpl($driverImpl);
     //$doctrineConfig->setEntityNamespaces(
     //    $options['entitiesNamespaces']);
     $doctrineConfig->setProxyDir($options['paths']['proxies']);
     $doctrineConfig->setProxyNamespace($options['options']['proxiesNamespace']);
     $this->getBootstrap()->em = \Doctrine\ORM\EntityManager::create($options['connections']['doctrine'], $doctrineConfig);
     return $this->getBootstrap()->em;
 }
示例#29
0
 public function setUp()
 {
     $reader = new \Doctrine\Common\Annotations\AnnotationReader();
     $driver = new \Doctrine\ORM\Mapping\Driver\AnnotationDriver($reader);
     $config = new \Doctrine\ORM\Configuration();
     $config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache());
     $config->setQueryCacheImpl(new \Doctrine\Common\Cache\ArrayCache());
     $config->setProxyDir(sys_get_temp_dir());
     $config->setProxyNamespace('SimpleThings\\EntityAudit\\Tests\\Proxies');
     $config->setMetadataDriverImpl($driver);
     $conn = array('driver' => $GLOBALS['DOCTRINE_DRIVER'], 'memory' => $GLOBALS['DOCTRINE_MEMORY'], 'dbname' => $GLOBALS['DOCTRINE_DATABASE'], 'user' => $GLOBALS['DOCTRINE_USER'], 'password' => $GLOBALS['DOCTRINE_PASSWORD'], 'host' => $GLOBALS['DOCTRINE_HOST']);
     $auditConfig = new AuditConfiguration();
     $auditConfig->setCurrentUsername("beberlei");
     $auditConfig->setAuditedEntityClasses($this->auditedEntities);
     $auditConfig->setGlobalIgnoreColumns(array('ignoreme'));
     $this->auditManager = new AuditManager($auditConfig);
     $this->auditManager->registerEvents($evm = new EventManager());
     if (php_sapi_name() == 'cli' && isset($_SERVER['argv']) && (in_array('-v', $_SERVER['argv']) || in_array('--verbose', $_SERVER['argv']))) {
         $config->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger());
     }
     $this->em = \Doctrine\ORM\EntityManager::create($conn, $config, $evm);
     $schemaTool = new \Doctrine\ORM\Tools\SchemaTool($this->em);
     $em = $this->em;
     try {
         $schemaTool->createSchema(array_map(function ($value) use($em) {
             return $em->getClassMetadata($value);
         }, $this->schemaEntities));
     } catch (\Exception $e) {
         if ($GLOBALS['DOCTRINE_DRIVER'] != 'pdo_mysql' || !($e instanceof \PDOException && strpos($e->getMessage(), 'Base table or view already exists') !== false)) {
             throw $e;
         }
     }
 }
示例#30
0
function createDoctrineConfig($cache, $cachedAnnotationReader)
{
    AnnotationRegistry::registerFile(dirname(__DIR__) . "/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php");
    //$cache = new Doctrine\Common\Cache\ArrayCache;
    //    if (extension_loaded('apc')) {
    //        $cache = new \Doctrine\Common\Cache\ApcCache();
    //    } else {
    //        $cache = new \Doctrine\Common\Cache\PhpFileCache();
    //    }
    $isDevMode = true;
    //    $annotationReader = new AnnotationReader;
    //    $cachedAnnotationReader = new Doctrine\Common\Annotations\CachedReader(
    //        $annotationReader, // use reader
    //        $cache // and a cache driver
    //    );
    $annotationDriver = new Doctrine\ORM\Mapping\Driver\AnnotationDriver($cachedAnnotationReader, array(__DIR__ . '/Resource'));
    $driverChain = new Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain();
    Gedmo\DoctrineExtensions::registerAbstractMappingIntoDriverChainORM($driverChain, $cachedAnnotationReader);
    $driverChain->addDriver($annotationDriver, 'Uppu4\\Entity');
    $config = Setup::createAnnotationMetadataConfiguration(array(__DIR__ . "/Resource"), $isDevMode);
    //!!!!!!
    $config = new Doctrine\ORM\Configuration();
    $config->setProxyDir(sys_get_temp_dir());
    $config->setProxyNamespace('Proxy');
    $config->setAutoGenerateProxyClasses(true);
    // this can be based on production config.
    // register metadata driver
    $config->setMetadataDriverImpl($driverChain);
    // use our already initialized cache driver
    $config->setMetadataCacheImpl($cache);
    $config->setQueryCacheImpl($cache);
    $deleted = $cache->deleteAll();
    return $config;
}