2009-02-17 11:01:34 +03:00
|
|
|
<?php
|
2009-05-29 18:46:53 +04:00
|
|
|
|
2009-02-17 11:01:34 +03:00
|
|
|
require '../../lib/Doctrine/Common/ClassLoader.php';
|
|
|
|
|
|
|
|
$classLoader = new \Doctrine\Common\ClassLoader();
|
|
|
|
$classLoader->setBasePath('Doctrine', realpath(__DIR__ . '/../../lib'));
|
|
|
|
$classLoader->setBasePath('Entities', __DIR__);
|
|
|
|
|
|
|
|
$config = new \Doctrine\ORM\Configuration();
|
|
|
|
$config->setMetadataCacheImpl(new \Doctrine\ORM\Cache\ArrayCache);
|
|
|
|
$config->setMetadataDriverImpl(new \Doctrine\ORM\Mapping\Driver\YamlDriver(__DIR__ . '/schema'));
|
|
|
|
$eventManager = new \Doctrine\Common\EventManager();
|
|
|
|
$connectionOptions = array(
|
|
|
|
'driver' => 'pdo_sqlite',
|
|
|
|
'path' => 'database.sqlite'
|
|
|
|
);
|
2009-05-29 18:46:53 +04:00
|
|
|
$em = \Doctrine\ORM\EntityManager::create($connectionOptions, $config, $eventManager);
|