Skip to content

Instantly share code, notes, and snippets.

@marijn
Created November 28, 2009 16:22
Show Gist options
  • Save marijn/244558 to your computer and use it in GitHub Desktop.
Save marijn/244558 to your computer and use it in GitHub Desktop.
<?php
require_once __DIR__ . '/../lib/vendor/Symfony/lib/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();
/**
* ProjectConfiguration.
*
* @author Marijn Huizendveld <marijn@round84.com>
* @version $Revision$ changed by $Author$
*/
class ProjectConfiguration extends sfProjectConfiguration
{
/**
* Project configuration setup.
*
* @return void
*/
public function setup ()
{
$this->enablePlugins(array('sfDoctrine2Plugin'));
if ( ! class_exists('Doctrine\Common\IsolatedClassLoader', FALSE))
{
require_once __DIR__ . '/../plugins/sfDoctrine2Plugin/lib/vendor/doctrine/Doctrine/Common/IsolatedClassLoader.php';
}
$classLoader = new Doctrine\Common\IsolatedClassLoader('Entities');
$classLoader->setBasePath($this->getRootDir() . '/lib');
$classLoader->register();
}
/**
* Configure doctrine.
*
* @param Doctrine\ORM\Configuration $arg_configuration The doctrine configuration object.
*
* @return void
*/
public function configureDoctrineConnection (\Doctrine\ORM\Configuration $arg_configuration)
{
// sets back to the default anotation based metadriver implementation
$arg_configuration->setMetadataDriverImpl(NULL);
$arg_configuration->setProxyDir($this->getRootDir() . '/cache/lib/Proxies');
$arg_configuration->setProxyNamespace('Proxies');
$arg_configuration->setAutoGenerateProxyClasses(TRUE);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment