public function initialize()
 {
     sfConfig::set('sf_orm', 'doctrine');
     if (!sfConfig::get('sf_admin_module_web_dir')) {
         sfConfig::set('sf_admin_module_web_dir', '/sfDoctrine2Plugin');
     }
     if (sfConfig::get('sf_web_debug')) {
         require_once __DIR__ . '/../lib/debug/sfWebDebugPanelDoctrine.class.php';
         $this->dispatcher->connect('debug.web.load_panels', array('sfWebDebugPanelDoctrine', 'listenToAddPanelEvent'));
     }
     require_once __DIR__ . '/../lib/vendor/doctrine/lib/Doctrine/Common/ClassLoader.php';
     $classLoader = new \Doctrine\Common\ClassLoader('DoctrineExtensions');
     $classLoader->setIncludePath(__DIR__ . '/../lib/vendor/active_entity');
     $classLoader->register();
     $classLoader = new \Doctrine\Common\ClassLoader('Doctrine');
     $classLoader->setIncludePath(__DIR__ . '/../lib/vendor/doctrine/lib');
     $classLoader->register();
     $classLoader = new \Doctrine\Common\ClassLoader('Symfony');
     $classLoader->setIncludePath(__DIR__ . '/../lib/vendor/doctrine/lib/vendor');
     $classLoader->register();
     // Entities Classes
     $classLoader = new \Doctrine\Common\ClassLoader('Entities', sfConfig::get('sf_lib_dir') . DIRECTORY_SEPARATOR . 'entities' . DIRECTORY_SEPARATOR . 'doctrine');
     $classLoader->register();
     $classLoader = new \Doctrine\Common\ClassLoader('Repositories', sfConfig::get('sf_lib_dir') . DIRECTORY_SEPARATOR . 'entities' . DIRECTORY_SEPARATOR . 'doctrine');
     $classLoader->register();
     $classLoader = new \Doctrine\Common\ClassLoader('Proxies', sfConfig::get('sf_lib_dir'));
     $classLoader->register();
     // Document classes
     $classLoader = new \Doctrine\Common\ClassLoader('Documents', sfConfig::get('sf_lib_dir'));
     $classLoader->register();
     $this->dispatcher->connect('component.method_not_found', array($this, 'componentMethodNotFound'));
 }