From 7430320bac802095b773ab596c7c4215fc81f4e0 Mon Sep 17 00:00:00 2001 From: Gusakov Nikita Date: Sat, 18 May 2013 01:40:05 +0400 Subject: [PATCH] ready --- tools/sandbox/bootstrap.php | 0 tools/sandbox/cli-config.php | 36 ------------------------------------ 2 files changed, 36 deletions(-) create mode 100644 tools/sandbox/bootstrap.php delete mode 100644 tools/sandbox/cli-config.php diff --git a/tools/sandbox/bootstrap.php b/tools/sandbox/bootstrap.php new file mode 100644 index 000000000..e69de29bb diff --git a/tools/sandbox/cli-config.php b/tools/sandbox/cli-config.php deleted file mode 100644 index 2a34fd89b..000000000 --- a/tools/sandbox/cli-config.php +++ /dev/null @@ -1,36 +0,0 @@ -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) -)); \ No newline at end of file