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

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

공개 메소드들

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