1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace Symfony\Component\HttpKernel\DependencyInjection;
- use Symfony\Contracts\Service\ResetInterface;
- class ServicesResetter implements ResetInterface
- {
- private $resettableServices;
- private $resetMethods;
- public function __construct(\Traversable $resettableServices, array $resetMethods)
- {
- $this->resettableServices = $resettableServices;
- $this->resetMethods = $resetMethods;
- }
- public function reset()
- {
- foreach ($this->resettableServices as $id => $service) {
- $service->{$this->resetMethods[$id]}();
- }
- }
- }
|