build_bootstrap 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. #!/usr/bin/env php
  2. <?php
  3. /*
  4. * This file is part of the Symfony Standard Edition.
  5. *
  6. * (c) Fabien Potencier <fabien@symfony.com>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. require_once __DIR__.'/../vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
  12. /*
  13. * This file is part of the Symfony package.
  14. *
  15. * (c) Fabien Potencier <fabien@symfony.com>
  16. *
  17. * For the full copyright and license information, please view the LICENSE
  18. * file that was distributed with this source code.
  19. */
  20. use Symfony\Component\ClassLoader\UniversalClassLoader;
  21. use Symfony\Component\ClassLoader\ClassCollectionLoader;
  22. $loader = new UniversalClassLoader();
  23. $loader->registerNamespaces(array('Symfony' => __DIR__.'/../vendor/symfony/src'));
  24. $loader->register();
  25. $file = __DIR__.'/../app/bootstrap.php.cache';
  26. if (file_exists($file)) {
  27. unlink($file);
  28. }
  29. ClassCollectionLoader::load(array(
  30. 'Symfony\\Component\\DependencyInjection\\ContainerInterface',
  31. 'Symfony\\Component\\DependencyInjection\\Container',
  32. 'Symfony\\Component\\DependencyInjection\\ContainerAwareInterface',
  33. 'Symfony\\Component\\DependencyInjection\\ContainerAware',
  34. 'Symfony\\Component\\HttpKernel\\Bundle\\BundleInterface',
  35. 'Symfony\\Component\\HttpKernel\\Bundle\\Bundle',
  36. 'Symfony\\Component\\HttpKernel\\Debug\\ErrorHandler',
  37. 'Symfony\\Component\\HttpKernel\\HttpKernelInterface',
  38. 'Symfony\\Component\\HttpKernel\\HttpKernel',
  39. 'Symfony\\Component\\HttpKernel\\KernelInterface',
  40. 'Symfony\\Component\\HttpKernel\\Kernel',
  41. 'Symfony\\Component\\HttpFoundation\\ParameterBag',
  42. 'Symfony\\Component\\HttpFoundation\\FileBag',
  43. 'Symfony\\Component\\HttpFoundation\\ServerBag',
  44. 'Symfony\\Component\\HttpFoundation\\HeaderBag',
  45. 'Symfony\\Component\\HttpFoundation\\Request',
  46. 'Symfony\\Component\\HttpFoundation\\ApacheRequest',
  47. 'Symfony\\Component\\ClassLoader\\ClassCollectionLoader',
  48. 'Symfony\\Component\\ClassLoader\\UniversalClassLoader',
  49. 'Symfony\\Component\\ClassLoader\\MapFileClassLoader',
  50. 'Symfony\\Component\\Config\\ConfigCache',
  51. ), dirname($file), basename($file, '.php.cache'), false, false, '.php.cache');
  52. file_put_contents($file, "<?php\n\nnamespace { require_once __DIR__.'/autoload.php'; }\n\n".substr(file_get_contents($file), 5));
  53. $file = __DIR__.'/../app/bootstrap_cache.php.cache';
  54. if (file_exists($file)) {
  55. unlink($file);
  56. }
  57. ClassCollectionLoader::load(array(
  58. 'Symfony\\Component\\HttpKernel\\KernelInterface',
  59. 'Symfony\\Component\\HttpKernel\\Kernel',
  60. 'Symfony\\Component\\HttpKernel\\HttpKernelInterface',
  61. 'Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache',
  62. 'Symfony\\Component\\HttpKernel\\HttpCache\\StoreInterface',
  63. 'Symfony\\Component\\HttpKernel\\HttpCache\\Store',
  64. 'Symfony\\Component\\HttpKernel\\HttpCache\\Esi',
  65. 'Symfony\\Component\\HttpFoundation\\ParameterBag',
  66. 'Symfony\\Component\\HttpFoundation\\FileBag',
  67. 'Symfony\\Component\\HttpFoundation\\ServerBag',
  68. 'Symfony\\Component\\HttpFoundation\\HeaderBag',
  69. 'Symfony\\Component\\HttpFoundation\\Request',
  70. 'Symfony\\Component\\HttpFoundation\\ApacheRequest',
  71. 'Symfony\\Component\\HttpFoundation\\ResponseHeaderBag',
  72. 'Symfony\\Component\\HttpFoundation\\Response',
  73. 'Symfony\\Component\\ClassLoader\\UniversalClassLoader',
  74. ), dirname($file), basename($file, '.php.cache'), false, false, '.php.cache');
  75. file_put_contents($file, "<?php\n\nnamespace { require_once __DIR__.'/autoload.php'; }\n\n".substr(file_get_contents($file), 5));