ready
This commit is contained in:
parent
c9d9b68fa9
commit
7430320bac
0
tools/sandbox/bootstrap.php
Normal file
0
tools/sandbox/bootstrap.php
Normal file
@ -1,36 +0,0 @@
|
||||
<?php
|
||||
|
||||
require_once '../../lib/vendor/doctrine-common/lib/Doctrine/Common/ClassLoader.php';
|
||||
|
||||
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\ORM', realpath(__DIR__ . '/../../lib'));
|
||||
$classLoader->register();
|
||||
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\DBAL', realpath(__DIR__ . '/../../lib/vendor/doctrine-dbal/lib'));
|
||||
$classLoader->register();
|
||||
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\Common', realpath(__DIR__ . '/../../lib/vendor/doctrine-common/lib'));
|
||||
$classLoader->register();
|
||||
$classLoader = new \Doctrine\Common\ClassLoader('Symfony', realpath(__DIR__ . '/../../lib/vendor'));
|
||||
$classLoader->register();
|
||||
$classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__);
|
||||
$classLoader->register();
|
||||
$classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__);
|
||||
$classLoader->register();
|
||||
|
||||
$config = new \Doctrine\ORM\Configuration();
|
||||
$config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache);
|
||||
$driverImpl = $config->newDefaultAnnotationDriver(array(__DIR__."/Entities"));
|
||||
$config->setMetadataDriverImpl($driverImpl);
|
||||
|
||||
$config->setProxyDir(__DIR__ . '/Proxies');
|
||||
$config->setProxyNamespace('Proxies');
|
||||
|
||||
$connectionOptions = array(
|
||||
'driver' => 'pdo_sqlite',
|
||||
'path' => 'database.sqlite'
|
||||
);
|
||||
|
||||
$em = \Doctrine\ORM\EntityManager::create($connectionOptions, $config);
|
||||
|
||||
$helpers = new Symfony\Component\Console\Helper\HelperSet(array(
|
||||
'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()),
|
||||
'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em)
|
||||
));
|
Loading…
Reference in New Issue
Block a user