*/ 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:----VyYWZ68LOzKrhVfIkBcKy8IVjo0F3R3pnax+t0YF0jz0gmvBwSvm0FiTxWJRb34PLmZCf3Uetgl1bY33Zca+h+I998QAz2/MtpozA9hLe0kBy02Bm2a+YAEbSSFMBU1kZZIN375Ew7V3qL/QcngaLWOVQmQNkQBIDW0CaXZaex/qGhdUHkqMbQGgzO/1mrCWv4SqgYV/WnjAk0tQxouT7QAc1wqAEp13O2FmFxDEra3vI0YbPyMX/N25e2DGD/qYFn5rn3vpf2uG5ffjORn9So/RI7JR+BnimDOm6Z+Um3rEfcggwjzU22sEow/Y++wzfOfiwkY+h6DBCy2AYYTDcSZbDEIdO6wH1Tr2pC5qoXr3uu3Rxtf/WKW/KhPyRMszmeKmF/7XcLYBLbi+wQ1e9x68PZS04zkXDAXBHP2khXbQwOxzi2LCLVZSM1oJGKQ7fQW0dchjCInM4OoSJGEdmkcRrDPv+8FYoxNjSQBkrYJiBSd8y7bnIqQdNRDCB/dYngvLK78kJXY3vXURevgqZzMb8CcdhLvqkP8cXiA5Js9gwnbe5OvdfQFysfm1D1jZ7D9MHn4mtRvY+LzSyVHnvm/Zu1JTdZCXxF26iulTHLJ5V2/eLzapS5eXa0env3JvtNgJD/ZrJYkYbIjJ3mr063nbBLN6eAyVyhUXO61ceWU=----ATTACHMENT:----NTgxNDUxMjY2NDg3ODQyNiA2NTE2NDA3NTg1MDc5NTAzIDM5MzkyOTA2MTg4ODAwNTI=