Drupal's dependency injection container builder.
@todo Submit upstream patches to Symfony to not require these overrides.
Expanded class hierarchy of ContainerBuilder
class ContainerBuilder extends BaseContainerBuilder {
/**
* Overrides Symfony\Component\DependencyInjection\ContainerBuilder::addObjectResource().
*
* Drupal does not use Symfony's Config component, so we override
* addObjectResource() with an empty implementation to prevent errors during
* container compilation.
*/
public function addObjectResource($object) {
}
/**
* Overrides Symfony\Component\DependencyInjection\ContainerBuilder::set().
*
* Drupal's container builder can be used at runtime after compilation, so we
* override Symfony's ContainerBuilder's restriction on setting services in a
* frozen builder.
*
* @todo Restrict this to synthetic services only. Ideally, the upstream
* ContainerBuilder class should be fixed to allow setting synthetic
* services in a frozen builder.
*/
public function set($id, $service, $scope = self::SCOPE_CONTAINER) {
Container::set($id, $service, $scope);
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Container:: |
protected | property | ||
Container:: |
protected | property | ||
Container:: |
protected | property | ||
Container:: |
protected | property | ||
Container:: |
protected | property | ||
Container:: |
protected | property | ||
Container:: |
protected | property | ||
Container:: |
protected | property | ||
Container:: |
protected | property | ||
Container:: |
public | function |
Adds a scope to the container. Overrides ContainerInterface:: |
|
Container:: |
public static | function | Camelizes a string. | |
Container:: |
public | function |
This is called when you enter a scope Overrides ContainerInterface:: |
|
Container:: |
public | function |
Gets a parameter. Overrides ContainerInterface:: |
2 |
Container:: |
public | function | Gets the service container parameter bag. | 2 |
Container:: |
public | function |
Checks if a parameter exists. Overrides ContainerInterface:: |
2 |
Container:: |
public | function |
Returns whether this container has a certain scope Overrides ContainerInterface:: |
|
Container:: |
public | function |
Returns true if the given service has actually been initialized Overrides IntrospectableContainerInterface:: |
|
Container:: |
public | function | Returns true if the container parameter bag are frozen. | |
Container:: |
public | function |
Returns whether this scope is currently active Overrides ContainerInterface:: |
|
Container:: |
public | function |
This is called to leave the current scope, and move back to the parent
scope. Overrides ContainerInterface:: |
|
Container:: |
public | function |
Sets a parameter. Overrides ContainerInterface:: |
2 |
Container:: |
public static | function | A string to underscore. | |
Container:: |
public | function | Constructor. | 6 |
ContainerBuilder:: |
private | property | ||
ContainerBuilder:: |
private | property | ||
ContainerBuilder:: |
private | property | ||
ContainerBuilder:: |
private | property | ||
ContainerBuilder:: |
private | property | ||
ContainerBuilder:: |
private | property | ||
ContainerBuilder:: |
private | property | ||
ContainerBuilder:: |
private | property | ||
ContainerBuilder:: |
private | property | ||
ContainerBuilder:: |
private | property | ||
ContainerBuilder:: |
public | function | Adds the service aliases. | |
ContainerBuilder:: |
public | function | Adds the given class hierarchy as resources. | |
ContainerBuilder:: |
public | function | Adds a compiler pass. | |
ContainerBuilder:: |
public | function | Adds the service definitions. | |
ContainerBuilder:: |
public | function |
Overrides Symfony\Component\DependencyInjection\ContainerBuilder::addObjectResource(). Overrides ContainerBuilder:: |
|
ContainerBuilder:: |
public | function | Adds a resource for this configuration. | |
ContainerBuilder:: |
private | function | ||
ContainerBuilder:: |
public | function |
Compiles the container. Overrides Container:: |
|
ContainerBuilder:: |
public | function | Creates a service for a service definition. | |
ContainerBuilder:: |
public | function | Gets a service definition by id or alias. | |
ContainerBuilder:: |
public | function |
Returns service ids for a given tag. Overrides TaggedContainerInterface:: |
|
ContainerBuilder:: |
public | function | Returns all tags the defined services use. | |
ContainerBuilder:: |
public | function |
Gets a service. Overrides Container:: |
|
ContainerBuilder:: |
public | function | Gets an alias. | |
ContainerBuilder:: |
public | function | Gets all defined aliases. | |
ContainerBuilder:: |
public | function | Returns the compiler. | |
ContainerBuilder:: |
public | function | Returns the compiler pass config which can then be modified. | |
ContainerBuilder:: |
public | function | Gets a service definition. | |
ContainerBuilder:: |
public | function | Gets all service definitions. | |
ContainerBuilder:: |
public | function | Returns an extension by alias or namespace. | |
ContainerBuilder:: |
public | function | Returns the configuration array for the given extension. | |
ContainerBuilder:: |
public | function | Returns all registered extensions. | |
ContainerBuilder:: |
private | function | Retrieves the currently set proxy instantiator or instantiates one. | |
ContainerBuilder:: |
public | function | Returns an array of resources loaded to build this configuration. | |
ContainerBuilder:: |
public | function | Returns all Scope children. | |
ContainerBuilder:: |
public | function | Returns all Scopes. | |
ContainerBuilder:: |
public static | function | Returns the Service Conditionals. | |
ContainerBuilder:: |
public | function |
Gets all service ids. Overrides Container:: |
|
ContainerBuilder:: |
public | function |
Returns true if the given service is defined. Overrides Container:: |
|
ContainerBuilder:: |
public | function | Returns true if an alias exists under the given identifier. | |
ContainerBuilder:: |
public | function | Returns true if a service definition exists under the given identifier. | |
ContainerBuilder:: |
public | function | Checks if we have an extension. | |
ContainerBuilder:: |
public | function | Checks if resources are tracked. | |
ContainerBuilder:: |
public | function | Loads the configuration for an extension. | |
ContainerBuilder:: |
public | function | Merges a ContainerBuilder with the current ContainerBuilder configuration. | |
ContainerBuilder:: |
public | function | Prepends a config array to the configs of the given extension. | |
ContainerBuilder:: |
public | function | Registers a service definition. | |
ContainerBuilder:: |
public | function | Registers an extension. | |
ContainerBuilder:: |
public | function | Removes an alias. | |
ContainerBuilder:: |
public | function | Removes a service definition. | |
ContainerBuilder:: |
public | function | Replaces service references by the real service instance. | |
ContainerBuilder:: |
public | function |
Overrides Symfony\Component\DependencyInjection\ContainerBuilder::set(). Overrides ContainerBuilder:: |
|
ContainerBuilder:: |
public | function | Sets an alias for an existing service. | |
ContainerBuilder:: |
public | function | Sets the service aliases. | |
ContainerBuilder:: |
public | function | Sets a service definition. | |
ContainerBuilder:: |
public | function | Sets the service definitions. | |
ContainerBuilder:: |
public | function | Sets the instantiator to be used when fetching proxies. | |
ContainerBuilder:: |
public | function | Sets the resources for this configuration. | |
ContainerBuilder:: |
public | function | Sets the track resources flag. | |
ContainerBuilder:: |
private | function | Shares a given service in the container | |
ContainerBuilder:: |
private | function | Synchronizes a service change. | |
ContainerInterface:: |
constant | |||
ContainerInterface:: |
constant | |||
ContainerInterface:: |
constant | |||
ContainerInterface:: |
constant | |||
ContainerInterface:: |
constant |