Esempio n. 1
0
 protected function setUp()
 {
     if (!isset($GLOBALS['EXAMPLE_CONFIG'])) {
         $configFile = __DIR__ . "/../../config.yml-dist";
     } else {
         $configFile = $GLOBALS['EXAMPLE_CONFIG'];
     }
     $this->entityManager = \CarFramework\Application::bootstrap($configFile);
 }
Esempio n. 2
0
<?php

require_once "vendor/.composer/autoload.php";
$configFile = __DIR__ . "/config.yml";
if (!file_exists($configFile)) {
    $configFile = __DIR__ . "/config.yml-dist";
}
$cache = new \Doctrine\Common\Cache\ArrayCache();
/*$memcache = new \Memcache();
$memcache->connect('127.0.0.1');
$cache = new \Doctrine\Common\Cache\MemcacheCache();
$cache->setMemcache($memcache);*/
$entityManager = \CarFramework\Application::bootstrap($configFile, true, $cache);