PHP 인터페이스 Kraken\Util\Factory\FactoryInterface

파일 보기 프로젝트 열기: kraken-php/framework

공개 메소드들

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