PHP 클래스 DI\Definition\Helper\FactoryDefinitionHelper

저자: Matthieu Napoli ([email protected])
상속: implements DI\Definition\Helper\DefinitionHelper
파일 보기 프로젝트 열기: mnapoli/php-di

공개 메소드들

메소드 설명
__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