PHP Class SelvinOrtiz\Zit\Zit

Class Zit
Author: Selvin Ortiz - https://selvinortiz.com
Inheritance: implements SelvinOrtiz\Zit\IZit
ファイルを表示 Open project: johndwells/craft.minimee Class Usage Examples

Protected Properties

Property Type Description
$callables
$instances
$services

Public Methods

Method Description
__call ( $id, $args = [] )
__callStatic ( $id, $args = [] )
__get ( $id )
bind ( string $id, Closure $serviceGenerator ) Binds the service generator and resolves it by its id
extend ( string $id, Closure $callable ) Binds the callable function and executes it by its id
getInstance ( ) : object Instantiate Zit or the extending, statically called class
stash ( string $id, object $serviceInstance ) Stashes away a service instance and resolves it by its id

Protected Methods

Method Description
__clone ( )
__construct ( )
pop ( $id, $args = [] )

Method Details

__call() public method

public __call ( $id, $args = [] )

__callStatic() public static method

public static __callStatic ( $id, $args = [] )

__clone() protected method

protected __clone ( )

__construct() protected method

protected __construct ( )

__get() public method

public __get ( $id )

bind() public method

Binds the service generator and resolves it by its id
public bind ( string $id, Closure $serviceGenerator )
$id string The service generator id
$serviceGenerator Closure The service generator closure/function

extend() public method

Binds the callable function and executes it by its id
public extend ( string $id, Closure $callable )
$id string The callable function id
$callable Closure The callable function

getInstance() public static method

Instantiate Zit or the extending, statically called class
public static getInstance ( ) : object
return object

pop() protected method

protected pop ( $id, $args = [] )

stash() public method

Stashes away a service instance and resolves it by its id
public stash ( string $id, object $serviceInstance )
$id string The service instance id
$serviceInstance object The service instance

Property Details

$callables protected_oe property

protected $callables

$instances protected_oe static_oe property

protected static $instances

$services protected_oe property

protected $services