ExtensionInterface.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. * @api
  18. */
  19. interface ExtensionInterface
  20. {
  21. /**
  22. * Loads a specific configuration.
  23. *
  24. * @param array $config An array of configuration values
  25. * @param ContainerBuilder $container A ContainerBuilder instance
  26. *
  27. * @throws InvalidArgumentException When provided tag is not defined in this extension
  28. *
  29. * @api
  30. */
  31. public function load(array $config, ContainerBuilder $container);
  32. /**
  33. * Returns the namespace to be used for this extension (XML namespace).
  34. *
  35. * @return string The XML namespace
  36. *
  37. * @api
  38. */
  39. public function getNamespace();
  40. /**
  41. * Returns the base path for the XSD files.
  42. *
  43. * @return string The XSD base path
  44. *
  45. * @api
  46. */
  47. public function getXsdValidationBasePath();
  48. /**
  49. * Returns the recommended alias to use in XML.
  50. *
  51. * This alias is also the mandatory prefix to use when using YAML.
  52. *
  53. * @return string The alias
  54. *
  55. * @api
  56. */
  57. public function getAlias();
  58. }