PHP Класс DI\Definition\Helper\FactoryDefinitionHelper

Автор: Matthieu Napoli ([email protected])
Наследование: implements DI\Definition\Helper\DefinitionHelper
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( callable $factory, boolean $decorate = false )
getDefinition ( string $entryName ) : FactoryDefinition
parameter ( string $parameter, mixed $value ) : FactoryDefinitionHelper Defines arguments to pass to the factory.
scope ( string $scope ) : FactoryDefinitionHelper Defines the scope of the entry.

Описание методов

__construct() публичный Метод

public __construct ( callable $factory, boolean $decorate = false )
$factory callable
$decorate boolean Is the factory decorating a previous definition?

getDefinition() публичный Метод

public getDefinition ( string $entryName ) : FactoryDefinition
$entryName string Container entry name
Результат DI\Definition\FactoryDefinition

parameter() публичный Метод

Because factory methods do not yet support annotations or autowiring, this method should be used to define all parameters except the ContainerInterface and RequestedEntry. Multiple calls can be made to the method to override individual values.
public parameter ( string $parameter, mixed $value ) : FactoryDefinitionHelper
$parameter string Name or index of the parameter for which the value will be given.
$value mixed Value to give to this parameter.
Результат FactoryDefinitionHelper

scope() публичный Метод

Defines the scope of the entry.
public scope ( string $scope ) : FactoryDefinitionHelper
$scope string
Результат FactoryDefinitionHelper