PHP Class phpbb_mock_container_builder

Inheritance: implements Symfony\Component\DependencyInjection\ContainerInterface
Show file Open project: phpbb/phpbb Class Usage Examples

Protected Properties

Property Type Description
$parameters
$services

Public Methods

Method Description
addScope ( Symfony\Component\DependencyInjection\ScopeInterface $scope ) Adds a scope to the container
enterScope ( string $name ) Enters the given scope
get ( string $id, integer $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE ) : object Gets a service.
getParameter ( string $name ) : mixed Gets a parameter.
has ( string $id ) : boolean Returns true if the given service is defined.
hasParameter ( string $name ) : boolean Checks if a parameter exists.
hasScope ( string $name ) : boolean Whether this container has the given scope
initialized ( $id )
isFrozen ( )
isScopeActive ( string $name ) : boolean Determines whether the given scope is currently active.
leaveScope ( string $name ) Leaves the current scope, and re-enters the parent scope
set ( string $id, object $service, boolean $shared = false ) Sets a service.
setParameter ( string $name, mixed $value ) Sets a parameter.

Method Details

addScope() public method

Adds a scope to the container
public addScope ( Symfony\Component\DependencyInjection\ScopeInterface $scope )
$scope Symfony\Component\DependencyInjection\ScopeInterface

enterScope() public method

Enters the given scope
public enterScope ( string $name )
$name string

get() public method

Gets a service.
See also: Reference
public get ( string $id, integer $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE ) : object
$id string The service identifier
$invalidBehavior integer The behavior when the service does not exist
return object The associated service

getParameter() public method

Gets a parameter.
public getParameter ( string $name ) : mixed
$name string The parameter name
return mixed The parameter value

has() public method

Returns true if the given service is defined.
public has ( string $id ) : boolean
$id string The service identifier
return boolean true if the service is defined, false otherwise

hasParameter() public method

Checks if a parameter exists.
public hasParameter ( string $name ) : boolean
$name string The parameter name
return boolean The presence of parameter in container

hasScope() public method

Whether this container has the given scope
public hasScope ( string $name ) : boolean
$name string
return boolean

initialized() public method

public initialized ( $id )

isFrozen() public method

public isFrozen ( )

isScopeActive() public method

It does however not check if the scope actually exists.
public isScopeActive ( string $name ) : boolean
$name string
return boolean

leaveScope() public method

Leaves the current scope, and re-enters the parent scope
public leaveScope ( string $name )
$name string

set() public method

Sets a service.
public set ( string $id, object $service, boolean $shared = false )
$id string The service identifier
$service object The service instance
$shared boolean Whether service is shared

setParameter() public method

Sets a parameter.
public setParameter ( string $name, mixed $value )
$name string The parameter name
$value mixed The parameter value

Property Details

$parameters protected property

protected $parameters

$services protected property

protected $services