PHP Trait Kraken\Util\Factory\SimpleFactoryTrait

Show file Open project: kraken-php/framework

Protected Properties

Property Type Description
$definition callable | null
$params mixed[]

Public Methods

Method Description
__construct ( )
__destruct ( )
bindParam ( $name, $value )
create ( $args = [] )
define ( callable $factoryMethod )
getDefinition ( )
getParam ( $name )
getParams ( )
hasDefinition ( )
hasParam ( $name )
unbindParam ( $name )

Private Methods

Method Description
invoke ( mixed $value ) : mixed

Method Details

__construct() public method

public __construct ( )

__destruct() public method

public __destruct ( )

bindParam() public method

See also: SimpleFactoryInterface::bindParam
public bindParam ( $name, $value )

create() public method

See also: SimpleFactoryInterface::create
public create ( $args = [] )

define() public method

See also: SimpleFactoryInterface::define
public define ( callable $factoryMethod )
$factoryMethod callable

getDefinition() public method

See also: SimpleFactoryInterface::getDefinition
public getDefinition ( )

getParam() public method

See also: SimpleFactoryInterface::getParam
public getParam ( $name )

getParams() public method

See also: SimpleFactoryInterface::getParams
public getParams ( )

hasDefinition() public method

See also: SimpleFactoryInterface::hasDefinition
public hasDefinition ( )

hasParam() public method

See also: SimpleFactoryInterface::hasParam
public hasParam ( $name )

unbindParam() public method

See also: SimpleFactoryInterface::unbindParam
public unbindParam ( $name )

Property Details

$definition protected property

protected callable|null $definition
return callable | null

$params protected property

protected mixed[] $params
return mixed[]