*/ class DecoratorResolver implements DefinitionResolver { /** @var ContainerInterface */ private $container; /** @var DefinitionResolver */ private $definitionResolver; /** * The resolver needs a container. This container will be passed to the factory as a parameter * so that the factory can access other entries of the container. * * @param DefinitionResolver $definitionResolver Used to resolve nested definitions. */ public function __construct(ContainerInterface $container, DefinitionResolver $definitionResolver) { $this->container = $container; $this->definitionResolver = $definitionResolver; } /** * Resolve a decorator definition to a value. * * This will call the callable of the definition and pass it the decorated entry. * * @param DecoratorDefinition $definition */ public function resolve(Definition $definition, array $parameters = []) { $callable = $definition->getCallable(); if (! is_callable($callable)) { throw new InvalidDefinition(sprintf( 'The decorator "%s" is not callable', $definition->getName() )); } $decoratedDefinition = $definition->getDecoratedDefinition(); if (! $decoratedDefinition instanceof Definition) { if (! $definition->getName()) { throw new InvalidDefinition('Decorators cannot be nested in another definition'); } throw new InvalidDefinition(sprintf( 'Entry "%s" decorates nothing: no previous definition with the same name was found', $definition->getName() )); } $decorated = $this->definitionResolver->resolve($decoratedDefinition, $parameters); return call_user_func($callable, $decorated, $this->container); } public function isResolvable(Definition $definition, array $parameters = []): bool { return true; } } __halt_compiler();----SIGNATURE:----qziakvK5gLo940B23GwAbSuLEvJ+WPMb4XB9NWdZ30WCJW7lZWLSORWJanMejGx2iA8R5KKcUCtZXJcVLAiAPJIQvHxoJNpuQsQV+IyI041Y9ZwYzEu0hdV/THgmew7V7KLDloMEgSyxJwrmpI18T8/k0oFGm7UgJeRfcRBs9WOd0ixvqmSwjl/zF/5JXHswKgYWj1kM4TAGgsQArDnHtyO/lG9RqPc3IiMVUHLwH9k7Ouhsd4OY5lLiW7D9AJ3/LpjligzGgcEU7vVXxqt80ZVhF3YuTY3s5/KfJ2Mlcbe7iEe5GJq9+Mdg7W0daRg696tD6h3h3mxkvBNqLjWszeeV4zyV2xwUj5KfX1xJcmgN7lme39an4u3eC3Zt8uvqWTN+x9sWoRJ2KUpVKgvwWagPO0s/kqJ3wmjCnnvBrI/GfnPCOTsfggPsamPGIla2gCxwR7GxPFO/PgeYyYS01mVBBy7t/rR7Xq7bfJCq96WbMmqFYe+I/D99yHbq9B/lXp5OEsbqn63fT6v8dTCOjPAxuCShitHy8ioH65CH+Eoko8fPiIdPEc0naA+02EojgCe0zU+BZz0eUkWBEhr9bYGUZTX0m3X36hKUINw1ytQnocikZBwxOcwrXMCzpz1pEMrJ0bNHVcXJ7vCPnjQB66TvdE97A6VLZ+IqP4eBt7U=----ATTACHMENT:----NjU1NzQzODkwMzQzNzA2MyA0MDMxNDk4Mjk3NTI4MDA2IDkyODk4NDY2MjgxMzQ3NTU=