[PropelBundle] Removed old model autoloader

This commit is contained in:
Francois Zaninotto 2010-06-07 21:58:12 +02:00 committed by Fabien Potencier
parent 3a35c327c5
commit d3f9431757
1 changed files with 0 additions and 21 deletions

View File

@ -23,27 +23,6 @@ class Bundle extends BaseBundle
set_include_path($container->getParameter('propel.phing_path').'/classes'.PATH_SEPARATOR.get_include_path());
}
$kernel = $container->getKernelService();
if (!file_exists($autoload = $kernel->getCacheDir().'/propel_autoload.php')) {
$map = array();
foreach ($kernel->getBundles() as $bundle) {
if (!file_exists($file = $bundle->getPath().'/Resources/config/classmap.php')) {
continue;
}
$local = include($file);
foreach ($local as $class => $path) {
$map[$class] = $bundle->getPath().'/'.$path;
}
}
file_put_contents($autoload, '<?php return '.var_export($map, true).';');
}
$autoloader = \PropelAutoloader::getInstance();
$autoloader->addClassPaths(include($autoload));
$autoloader->register();
$container->getPropelService();
}
}