Container

Container main class.
implements ArrayAccess

Known subclasses

SAREhub\Client\BasicClientContext
Methods Summary
public
# __construct( array $values = array ( ) )
Instantiates the container. Objects and parameters can be passed as argument to the constructor.
public
# offsetSet( string $id , mixed $value )
Sets a parameter or an object. Objects must be defined as Closures. Allowing any PHP callable leads to difficult to debug problems as function names (strings) are callable (creating a function with the same name as an existing parameter would break your container).

Implementation of

public
# offsetGet( string $id )
Gets a parameter or an object.

Implementation of

public
# offsetExists( string $id )
Checks if a parameter or an object is set.

Implementation of

public
# offsetUnset( string $id )
Unsets a parameter or an object.

Implementation of

public
# factory( callable $callable )
Marks a callable as being a factory service.
public
# protect( callable $callable )
Protects a callable from being interpreted as a service. This is useful when you want to store a callable as a parameter.
public
# raw( string $id )
Gets a parameter or the closure defining an object.
public
# extend( string $id , callable $callable )
Extends an object definition. Useful when you want to extend an existing object definition, without necessarily loading that object.
public
# keys( )
Returns all defined value names.
public
# register( Pimple\ServiceProviderInterface $provider , array $values = array ( ) )
Registers a service provider.