Created
November 28, 2009 16:22
-
-
Save marijn/244558 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once __DIR__ . '/../lib/vendor/Symfony/lib/autoload/sfCoreAutoload.class.php'; | |
sfCoreAutoload::register(); | |
/** | |
* ProjectConfiguration. | |
* | |
* @author Marijn Huizendveld <[email protected]> | |
* @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