File "DecoratorDefinition.php"

Full Path: /home/rattkxnv/byattorney.com/wp-content/plugins/elementor/vendor_prefixed/dependency-injection/php-di/php-di/src/Definition/DecoratorDefinition.php
File size: 827 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

declare (strict_types=1);
namespace ElementorDeps\DI\Definition;

/**
 * Factory that decorates a sub-definition.
 *
 * @since 5.0
 * @author Matthieu Napoli <matthieu@mnapoli.fr>
 */
class DecoratorDefinition extends FactoryDefinition implements Definition, ExtendsPreviousDefinition
{
    /**
     * @var Definition|null
     */
    private $decorated;
    public function setExtendedDefinition(Definition $definition)
    {
        $this->decorated = $definition;
    }
    /**
     * @return Definition|null
     */
    public function getDecoratedDefinition()
    {
        return $this->decorated;
    }
    public function replaceNestedDefinitions(callable $replacer)
    {
        // no nested definitions
    }
    public function __toString()
    {
        return 'Decorate(' . $this->getName() . ')';
    }
}