bootstrap.php 615B

123456789101112131415161718
  1. <?php
  2. require_once $_SERVER['SYMFONY'].'/Symfony/Component/ClassLoader/UniversalClassLoader.php';
  3. $loader = new Symfony\Component\ClassLoader\UniversalClassLoader();
  4. $loader->registerNamespace('Symfony', $_SERVER['SYMFONY']);
  5. $loader->registerNamespace('Assetic', $_SERVER['ASSETIC']);
  6. $loader->registerPrefix('Twig_', $_SERVER['TWIG']);
  7. $loader->register();
  8. spl_autoload_register(function($class)
  9. {
  10. if (0 === strpos($class, 'Symfony\\Bundle\\AsseticBundle\\') &&
  11. file_exists($file = __DIR__.'/../'.implode('/', array_slice(explode('\\', $class), 3)).'.php')) {
  12. require_once $file;
  13. }
  14. });