ExtensionInterface.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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\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@symfony.com>
  16. */
  17. interface ExtensionInterface
  18. {
  19. /**
  20. * Loads a specific configuration.
  21. *
  22. * @throws \InvalidArgumentException When provided tag is not defined in this extension
  23. */
  24. public function load(array $configs, ContainerBuilder $container);
  25. /**
  26. * Returns the namespace to be used for this extension (XML namespace).
  27. *
  28. * @return string The XML namespace
  29. */
  30. public function getNamespace();
  31. /**
  32. * Returns the base path for the XSD files.
  33. *
  34. * @return string|false
  35. */
  36. public function getXsdValidationBasePath();
  37. /**
  38. * Returns the recommended alias to use in XML.
  39. *
  40. * This alias is also the mandatory prefix to use when using YAML.
  41. *
  42. * @return string The alias
  43. */
  44. public function getAlias();
  45. }