ExtensionInterface.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien.potencier@symfony-project.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\DependencyInjection\Extension;
  11. use Symfony\Component\DependencyInjection\ContainerBuilder;
  12. /**
  13. * ExtensionInterface is the interface implemented by container extension classes.
  14. *
  15. * @author Fabien Potencier <fabien.potencier@symfony-project.com>
  16. */
  17. interface ExtensionInterface
  18. {
  19. /**
  20. * Loads a specific configuration.
  21. *
  22. * @param string $tag The tag name
  23. * @param array $config An array of configuration values
  24. * @param ContainerBuilder $configuration A ContainerBuilder instance
  25. *
  26. * @return ContainerBuilder A ContainerBuilder instance
  27. *
  28. * @throws \InvalidArgumentException When provided tag is not defined in this extension
  29. */
  30. function load($tag, array $config, ContainerBuilder $configuration);
  31. /**
  32. * Returns the namespace to be used for this extension (XML namespace).
  33. *
  34. * @return string The XML namespace
  35. */
  36. function getNamespace();
  37. /**
  38. * Returns the base path for the XSD files.
  39. *
  40. * @return string The XSD base path
  41. */
  42. function getXsdValidationBasePath();
  43. /**
  44. * Returns the recommended alias to use in XML.
  45. *
  46. * This alias is also the mandatory prefix to use when using YAML.
  47. *
  48. * @return string The alias
  49. */
  50. function getAlias();
  51. }