PHP 클래스 DI\Definition\FactoryDefinition

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

공개 메소드들

메소드 설명
__construct ( string $name, callable $factory, string | null $scope = null, array $parameters = [] )
__toString ( )
getCallable ( ) : callable
getName ( ) : string
getParameters ( ) : array
getScope ( ) Default scope is singleton: the callable is called once and the result is shared.

메소드 상세

__construct() 공개 메소드

public __construct ( string $name, callable $factory, string | null $scope = null, array $parameters = [] )
$name string Entry name
$factory callable Callable that returns the value associated to the entry name.
$scope string | null
$parameters array Parameters to be passed to the callable

__toString() 공개 메소드

public __toString ( )

getCallable() 공개 메소드

public getCallable ( ) : callable
리턴 callable Callable that returns the value associated to the entry name.

getName() 공개 메소드

public getName ( ) : string
리턴 string Entry name.

getParameters() 공개 메소드

public getParameters ( ) : array
리턴 array Array containing the parameters to be passed to the callable, indexed by name.

getScope() 공개 메소드

public getScope ( )