BundleInterface.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. * @param ContainerBuilder $container A ContainerBuilder instance
  35. */
  36. public function build(ContainerBuilder $container);
  37. /**
  38. * Returns the container extension that should be implicitly loaded.
  39. *
  40. * @return ExtensionInterface|null The default extension or null if there is none
  41. */
  42. public function getContainerExtension();
  43. /**
  44. * Returns the bundle name that this bundle overrides.
  45. *
  46. * Despite its name, this method does not imply any parent/child relationship
  47. * between the bundles, just a way to extend and override an existing
  48. * bundle.
  49. *
  50. * @return string The Bundle name it overrides or null if no parent
  51. */
  52. public function getParent();
  53. /**
  54. * Returns the bundle name (the class short name).
  55. *
  56. * @return string The Bundle name
  57. */
  58. public function getName();
  59. /**
  60. * Gets the Bundle namespace.
  61. *
  62. * @return string The Bundle namespace
  63. */
  64. public function getNamespace();
  65. /**
  66. * Gets the Bundle directory path.
  67. *
  68. * The path should always be returned as a Unix path (with /).
  69. *
  70. * @return string The Bundle absolute path
  71. */
  72. public function getPath();
  73. }