build_bootstrap.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. if (!$baseDir = realpath(__DIR__.'/../../../../../../..')) {
  12. exit('Looks like you don\'t have a standard layout.');
  13. }
  14. require_once $baseDir.'/vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
  15. /*
  16. * This file is part of the Symfony package.
  17. *
  18. * (c) Fabien Potencier <fabien@symfony.com>
  19. *
  20. * For the full copyright and license information, please view the LICENSE
  21. * file that was distributed with this source code.
  22. */
  23. use Symfony\Component\ClassLoader\UniversalClassLoader;
  24. use Symfony\Component\ClassLoader\ClassCollectionLoader;
  25. $loader = new UniversalClassLoader();
  26. $loader->registerNamespaces(array('Symfony' => $baseDir.'/vendor/symfony/src'));
  27. $loader->register();
  28. $file = $baseDir.'/app/bootstrap.php.cache';
  29. if (file_exists($file)) {
  30. unlink($file);
  31. }
  32. ClassCollectionLoader::load(array(
  33. 'Symfony\\Component\\Config\\ConfigCache',
  34. 'Symfony\\Component\\Config\\FileLocatorInterface',
  35. 'Symfony\\Component\\Config\\FileLocator',
  36. 'Symfony\\Component\\EventDispatcher\\EventDispatcherInterface',
  37. 'Symfony\\Component\\EventDispatcher\\EventDispatcher',
  38. 'Symfony\\Component\\EventDispatcher\\Event',
  39. 'Symfony\\Component\\DependencyInjection\\ContainerInterface',
  40. 'Symfony\\Component\\DependencyInjection\\Container',
  41. 'Symfony\\Component\\DependencyInjection\\ContainerAwareInterface',
  42. //'Symfony\\Component\\DependencyInjection\\ContainerAware',
  43. 'Symfony\\Component\\HttpKernel\\Bundle\\BundleInterface',
  44. 'Symfony\\Component\\HttpKernel\\Bundle\\Bundle',
  45. 'Symfony\\Component\\HttpKernel\\HttpKernelInterface',
  46. 'Symfony\\Component\\HttpKernel\\HttpKernel',
  47. 'Symfony\\Component\\HttpKernel\\KernelInterface',
  48. 'Symfony\\Component\\HttpKernel\\Kernel',
  49. 'Symfony\\Component\\HttpKernel\\Config\\FileLocator',
  50. 'Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface',
  51. 'Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver',
  52. 'Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener',
  53. 'Symfony\\Component\\HttpKernel\\KernelEvents',
  54. 'Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent',
  55. 'Symfony\\Component\\HttpKernel\\Event\\KernelEvent',
  56. 'Symfony\\Component\\HttpKernel\\Event\\FilterControllerEvent',
  57. 'Symfony\\Component\\HttpKernel\\Event\\FilterResponseEvent',
  58. 'Symfony\\Component\\HttpFoundation\\ParameterBag',
  59. 'Symfony\\Component\\HttpFoundation\\FileBag',
  60. 'Symfony\\Component\\HttpFoundation\\ServerBag',
  61. 'Symfony\\Component\\HttpFoundation\\HeaderBag',
  62. 'Symfony\\Component\\HttpFoundation\\Request',
  63. 'Symfony\\Component\\HttpFoundation\\ApacheRequest',
  64. 'Symfony\\Component\\HttpFoundation\\ResponseHeaderBag',
  65. 'Symfony\\Component\\HttpFoundation\\Response',
  66. 'Symfony\\Component\\ClassLoader\\UniversalClassLoader',
  67. 'Symfony\\Component\\Routing\\Matcher\\UrlMatcherInterface',
  68. 'Symfony\\Component\\Routing\\RequestContextAwareInterface',
  69. 'Symfony\\Component\\Routing\\Generator\\UrlGeneratorInterface',
  70. 'Symfony\\Component\\Routing\\RequestContext',
  71. 'Symfony\\Component\\Routing\\Matcher\\UrlMatcher',
  72. 'Symfony\\Component\\Routing\\Matcher\\RedirectableUrlMatcherInterface',
  73. 'Symfony\\Component\\Routing\\Generator\\UrlGenerator',
  74. 'Symfony\\Component\\Routing\\RouterInterface',
  75. 'Symfony\\Component\\Routing\\Router',
  76. 'Symfony\\Component\\Templating\\EngineInterface',
  77. 'Symfony\\Component\\Templating\\PhpEngine',
  78. 'Symfony\\Component\\Templating\\TemplateNameParserInterface',
  79. 'Symfony\\Component\\Templating\\TemplateNameParser',
  80. 'Symfony\\Component\\Templating\\Loader\\LoaderInterface',
  81. 'Symfony\\Component\\Templating\\TemplateReferenceInterface',
  82. 'Symfony\\Component\\Templating\\TemplateReference',
  83. 'Symfony\\Component\\Templating\\Storage\\Storage',
  84. 'Symfony\\Component\\Templating\\Storage\\FileStorage',
  85. 'Symfony\\Bundle\\FrameworkBundle\\HttpKernel',
  86. 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle',
  87. 'Symfony\\Bundle\\FrameworkBundle\\ContainerAwareEventDispatcher',
  88. 'Symfony\\Bundle\\FrameworkBundle\\Routing\\RedirectableUrlMatcher',
  89. 'Symfony\\Bundle\\FrameworkBundle\\Routing\\Router',
  90. 'Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerResolver',
  91. 'Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerNameParser',
  92. //'Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller',
  93. 'Symfony\\Bundle\\FrameworkBundle\\EventListener\\RouterListener',
  94. 'Symfony\\Bundle\\FrameworkBundle\\EventListener\\SessionListener',
  95. 'Symfony\\Bundle\\FrameworkBundle\\Templating\\GlobalVariables',
  96. 'Symfony\\Bundle\\FrameworkBundle\\Templating\\EngineInterface',
  97. 'Symfony\\Bundle\\FrameworkBundle\\Templating\\PhpEngine',
  98. 'Symfony\\Bundle\\FrameworkBundle\\Templating\\TemplateNameParser',
  99. 'Symfony\\Bundle\\FrameworkBundle\\Templating\\Loader\\FilesystemLoader',
  100. 'Symfony\\Bundle\\FrameworkBundle\\Templating\\Loader\\TemplateLocator',
  101. 'Symfony\\Bundle\\FrameworkBundle\\Templating\\TemplateReference',
  102. ), dirname($file), basename($file, '.php.cache'), false, false, '.php.cache');
  103. file_put_contents($file, "<?php\n\nnamespace { require_once __DIR__.'/autoload.php'; }\n\n".substr(file_get_contents($file), 5));