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

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

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

Метод Описание
bindParam ( string $name, mixed $value ) : Kraken\Util\Factory\FactoryInterface Bind param $value under $name key to Factory.
create ( mixed[] $args = [] ) : mixed Create object with given arguments using factoryMethod stored in Factory.
define ( callable $factoryMethod ) : Kraken\Util\Factory\FactoryInterface Define factory method for some object in Factory.
getDefinition ( ) : callable Return factory method definition stored in Factory.
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 ( ) : boolean Check if there is any factory method definition stored in Factory.
hasParam ( string $param ) : boolean Check if there is any param under $param $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 in Factory. Throws exception if there is no definition stored.
public create ( mixed[] $args = [] ) : mixed
$args mixed[]
Результат mixed

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

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

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

Return factory method definition stored in Factory.
public getDefinition ( ) : 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 in Factory.
public hasDefinition ( ) : boolean
Результат boolean

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

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

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

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