ContainerBagInterface.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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\ParameterBag;
  11. use Psr\Container\ContainerInterface;
  12. use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
  13. /**
  14. * ContainerBagInterface is the interface implemented by objects that manage service container parameters.
  15. *
  16. * @author Nicolas Grekas <p@tchwork.com>
  17. */
  18. interface ContainerBagInterface extends ContainerInterface
  19. {
  20. /**
  21. * Gets the service container parameters.
  22. *
  23. * @return array An array of parameters
  24. */
  25. public function all();
  26. /**
  27. * Replaces parameter placeholders (%name%) by their values.
  28. *
  29. * @param mixed $value A value
  30. *
  31. * @throws ParameterNotFoundException if a placeholder references a parameter that does not exist
  32. */
  33. public function resolveValue($value);
  34. /**
  35. * Escape parameter placeholders %.
  36. *
  37. * @param mixed $value
  38. *
  39. * @return mixed
  40. */
  41. public function escapeValue($value);
  42. /**
  43. * Unescape parameter placeholders %.
  44. *
  45. * @param mixed $value
  46. *
  47. * @return mixed
  48. */
  49. public function unescapeValue($value);
  50. }