菜谱项目

BundleInterface.php 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\HttpKernel\Bundle;
  11. use Symfony\Component\DependencyInjection\ContainerAwareInterface;
  12. use Symfony\Component\DependencyInjection\ContainerBuilder;
  13. use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
  14. /**
  15. * BundleInterface.
  16. *
  17. * @author Fabien Potencier <fabien@symfony.com>
  18. */
  19. interface BundleInterface extends ContainerAwareInterface
  20. {
  21. /**
  22. * Boots the Bundle.
  23. */
  24. public function boot();
  25. /**
  26. * Shutdowns the Bundle.
  27. */
  28. public function shutdown();
  29. /**
  30. * Builds the bundle.
  31. *
  32. * It is only ever called once when the cache is empty.
  33. */
  34. public function build(ContainerBuilder $container);
  35. /**
  36. * Returns the container extension that should be implicitly loaded.
  37. *
  38. * @return ExtensionInterface|null The default extension or null if there is none
  39. */
  40. public function getContainerExtension();
  41. /**
  42. * Returns the bundle name that this bundle overrides.
  43. *
  44. * Despite its name, this method does not imply any parent/child relationship
  45. * between the bundles, just a way to extend and override an existing
  46. * bundle.
  47. *
  48. * @return string The Bundle name it overrides or null if no parent
  49. */
  50. public function getParent();
  51. /**
  52. * Returns the bundle name (the class short name).
  53. *
  54. * @return string The Bundle name
  55. */
  56. public function getName();
  57. /**
  58. * Gets the Bundle namespace.
  59. *
  60. * @return string The Bundle namespace
  61. */
  62. public function getNamespace();
  63. /**
  64. * Gets the Bundle directory path.
  65. *
  66. * The path should always be returned as a Unix path (with /).
  67. *
  68. * @return string The Bundle absolute path
  69. */
  70. public function getPath();
  71. }