PHP Класс DI\Definition\FactoryDefinition

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

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

Метод Описание
__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 ( )