BundleInterface.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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\ContainerBuilder;
  12. /**
  13. * BundleInterface.
  14. *
  15. * @author Fabien Potencier <fabien@symfony.com>
  16. *
  17. * @api
  18. */
  19. interface BundleInterface
  20. {
  21. /**
  22. * Boots the Bundle.
  23. *
  24. * @api
  25. */
  26. function boot();
  27. /**
  28. * Shutdowns the Bundle.
  29. *
  30. * @api
  31. */
  32. function shutdown();
  33. /**
  34. * Builds the bundle.
  35. *
  36. * It is only ever called once when the cache is empty.
  37. *
  38. * @param ContainerBuilder $container A ContainerBuilder instance
  39. *
  40. * @api
  41. */
  42. function build(ContainerBuilder $container);
  43. /**
  44. * Returns the container extension that should be implicitly loaded.
  45. *
  46. * @return ExtensionInterface|null The default extension or null if there is none
  47. *
  48. * @api
  49. */
  50. function getContainerExtension();
  51. /**
  52. * Returns the bundle parent name.
  53. *
  54. * @return string The Bundle parent name it overrides or null if no parent
  55. *
  56. * @api
  57. */
  58. function getParent();
  59. /**
  60. * Returns the bundle name (the class short name).
  61. *
  62. * @return string The Bundle name
  63. *
  64. * @api
  65. */
  66. function getName();
  67. /**
  68. * Gets the Bundle namespace.
  69. *
  70. * @return string The Bundle namespace
  71. *
  72. * @api
  73. */
  74. function getNamespace();
  75. /**
  76. * Gets the Bundle directory path.
  77. *
  78. * The path should always be returned as a Unix path (with /).
  79. *
  80. * @return string The Bundle absolute path
  81. *
  82. * @api
  83. */
  84. function getPath();
  85. }