ResettableContainerInterface.php 967 B

12345678910111213141516171819202122232425262728293031
  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;
  11. /**
  12. * ResettableContainerInterface defines additional resetting functionality
  13. * for containers, allowing to release shared services when the container is
  14. * not needed anymore.
  15. *
  16. * @author Christophe Coevoet <stof@notk.org>
  17. */
  18. interface ResettableContainerInterface extends ContainerInterface
  19. {
  20. /**
  21. * Resets shared services from the container.
  22. *
  23. * The container is not intended to be used again after being reset in a normal workflow. This method is
  24. * meant as a way to release references for ref-counting.
  25. * A subsequent call to ContainerInterface::get will recreate a new instance of the shared service.
  26. */
  27. public function reset();
  28. }