PHP Интерфейс Kraken\Util\Factory\FactoryInterface

Показать файл Открыть проект

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

Метод Описание
bindParam ( string $name, mixed $value ) : Kraken\Util\Factory\FactoryInterface Bind param $value under $name key to Factory.
create ( string $name, mixed[] $args = [] ) : mixed Create object with given arguments using factoryMethod stored under $name key.
define ( string $name, callable $factoryMethod ) : Kraken\Util\Factory\FactoryInterface Define factory method for some object and register in under $name key.
getDefinition ( string $name ) : callable Return factory method definition stored under $name key.
getDefinitions ( ) : callable[] Return all definitions stored in Factory in the form of associative array.
getParam ( string $name ) : mixed Get param stored under $name key.
getParams ( ) : mixed[] Return all params stored in Factory in the form of associative array.
hasDefinition ( string $name ) : boolean Check if there is any factory method definition stored under $name key.
hasParam ( string $param ) : boolean Check if there is any param under $param $key.
remove ( string $name ) : Kraken\Util\Factory\FactoryInterface Remove factory method definition stored under $name key.
unbindParam ( string $name ) : Kraken\Util\Factory\FactoryInterface Unbind param stored under $name key from Factory.

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

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

Bind param $value under $name key to Factory.
public bindParam ( string $name, mixed $value ) : Kraken\Util\Factory\FactoryInterface
$name string
$value mixed
Результат Kraken\Util\Factory\FactoryInterface

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

Create object with given arguments using factoryMethod stored under $name key. Throws exception if there is no definition stored.
public create ( string $name, mixed[] $args = [] ) : mixed
$name string
$args mixed[]
Результат mixed

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

Define factory method for some object and register in under $name key.
public define ( string $name, callable $factoryMethod ) : Kraken\Util\Factory\FactoryInterface
$name string
$factoryMethod callable
Результат Kraken\Util\Factory\FactoryInterface

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

Return factory method definition stored under $name key.
public getDefinition ( string $name ) : callable
$name string
Результат callable

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

Return all definitions stored in Factory in the form of associative array.
public getDefinitions ( ) : callable[]
Результат callable[]

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

Get param stored under $name key. Throws exception if there is no param set under $name key.
public getParam ( string $name ) : mixed
$name string
Результат mixed

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

Return all params stored in Factory in the form of associative array.
public getParams ( ) : mixed[]
Результат mixed[]

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

Check if there is any factory method definition stored under $name key.
public hasDefinition ( string $name ) : boolean
$name string
Результат boolean

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

Check if there is any param under $param $key.
public hasParam ( string $param ) : boolean
$param string
Результат boolean

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

Remove factory method definition stored under $name key.
public remove ( string $name ) : Kraken\Util\Factory\FactoryInterface
$name string
Результат Kraken\Util\Factory\FactoryInterface

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

Unbind param stored under $name key from Factory.
public unbindParam ( string $name ) : Kraken\Util\Factory\FactoryInterface
$name string
Результат Kraken\Util\Factory\FactoryInterface