Method | Description | |
---|---|---|
addAliases ( array $aliases ) | Adds the service aliases. | |
addClassResource ( ReflectionClass $class ) : |
Adds the given class hierarchy as resources. | |
addCompilerPass ( Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface $pass, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION ) : |
Adds a compiler pass. | |
addDefinitions ( array $definitions ) | Adds the service definitions. | |
addExpressionLanguageProvider ( Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface $provider ) | ||
addObjectResource ( object $object ) : |
Adds the object class hierarchy as resources. | |
addResource ( Symfony\Component\Config\Resource\ResourceInterface $resource ) : |
Adds a resource for this configuration. | |
autowire ( string $id, null | string $class = null ) : |
Registers an autowired service definition. | |
compile ( ) | Compiles the container. | |
findDefinition ( string $id ) : |
Gets a service definition by id or alias. | |
findTaggedServiceIds ( string $name ) : array | Returns service ids for a given tag. | |
findTags ( ) : array | Returns all tags the defined services use. | |
findUnusedTags ( ) : string[] | Returns all tags not queried by findTaggedServiceIds. | |
get ( string $id, integer $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE ) : object | Gets a service. | |
getAlias ( string $id ) : |
Gets an alias. | |
getAliases ( ) : |
Gets all defined aliases. | |
getCompiler ( ) : |
Returns the compiler. | |
getCompilerPassConfig ( ) : |
Returns the compiler pass config which can then be modified. | |
getDefinition ( string $id ) : |
Gets a service definition. | |
getDefinitions ( ) : |
Gets all service definitions. | |
getEnvCounters ( ) : int[] | Get statistics about env usage. | |
getExpressionLanguageProviders ( ) : Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface[] | ||
getExtension ( string $name ) : Symfony\Component\DependencyInjection\Extension\ExtensionInterface | Returns an extension by alias or namespace. | |
getExtensionConfig ( string $name ) : array | Returns the configuration array for the given extension. | |
getExtensions ( ) : Symfony\Component\DependencyInjection\Extension\ExtensionInterface[] | Returns all registered extensions. | |
getResources ( ) : Symfony\Component\Config\Resource\ResourceInterface[] | Returns an array of resources loaded to build this configuration. | |
getServiceConditionals ( mixed $value ) : array | Returns the Service Conditionals. | |
getServiceIds ( ) : array | Gets all service ids. | |
has ( string $id ) : boolean | Returns true if the given service is defined. | |
hasAlias ( string $id ) : boolean | Returns true if an alias exists under the given identifier. | |
hasDefinition ( string $id ) : boolean | Returns true if a service definition exists under the given identifier. | |
hasExtension ( string $name ) : boolean | Checks if we have an extension. | |
isTrackingResources ( ) : boolean | Checks if resources are tracked. | |
loadFromExtension ( string $extension, array $values = [] ) : |
Loads the configuration for an extension. | |
merge ( |
Merges a ContainerBuilder with the current ContainerBuilder configuration. | |
prependExtensionConfig ( string $name, array $config ) | Prepends a config array to the configs of the given extension. | |
register ( string $id, string $class = null ) : |
Registers a service definition. | |
registerExtension ( Symfony\Component\DependencyInjection\Extension\ExtensionInterface $extension ) | Registers an extension. | |
removeAlias ( string $alias ) | Removes an alias. | |
removeDefinition ( string $id ) | Removes a service definition. | |
resolveEnvPlaceholders ( mixed $value, string | true | null $format = null, array &$usedEnvs = null ) : string | Resolves env parameter placeholders in a string or an array. | |
resolveServices ( mixed $value ) : mixed | Replaces service references by the real service instance and evaluates expressions. | |
set ( string $id, object $service ) | Sets a service. | |
setAlias ( string $alias, string | |
Sets an alias for an existing service. | |
setAliases ( array $aliases ) | Sets the service aliases. | |
setDefinition ( string $id, |
Sets a service definition. | |
setDefinitions ( array $definitions ) | Sets the service definitions. | |
setProxyInstantiator ( Symfony\Component\DependencyInjection\LazyProxy\Instantiator\InstantiatorInterface $proxyInstantiator ) | Sets the instantiator to be used when fetching proxies. | |
setResourceTracking ( boolean $track ) | Sets the track resources flag. | |
setResources ( array $resources ) : |
Sets the resources for this configuration. |
Method | Description | |
---|---|---|
callMethod ( $service, $call ) | ||
createService ( |
Creates a service for a service definition. | |
getExpressionLanguage ( ) | ||
getProxyInstantiator ( ) : Symfony\Component\DependencyInjection\LazyProxy\Instantiator\InstantiatorInterface | Retrieves the currently set proxy instantiator or instantiates one. | |
shareService ( |
Shares a given service in the container. |
public addAliases ( array $aliases ) | ||
$aliases | array | An array of aliases |
public addClassResource ( ReflectionClass $class ) : |
||
$class | ReflectionClass | |
return | The current instance |
public addCompilerPass ( Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface $pass, string $type = PassConfig::TYPE_BEFORE_OPTIMIZATION ) : |
||
$pass | Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface | A compiler pass |
$type | string | The type of compiler pass |
return | The current instance |
public addDefinitions ( array $definitions ) | ||
$definitions | array | An array of service definitions |
public addExpressionLanguageProvider ( Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface $provider ) | ||
$provider | Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface |
public addObjectResource ( object $object ) : |
||
$object | object | An object instance |
return | The current instance |
public addResource ( Symfony\Component\Config\Resource\ResourceInterface $resource ) : |
||
$resource | Symfony\Component\Config\Resource\ResourceInterface | A resource instance |
return | The current instance |
public compile ( ) |
public findDefinition ( string $id ) : |
||
$id | string | The service identifier or alias |
return | A Definition instance |
public findTaggedServiceIds ( string $name ) : array | ||
$name | string | The tag name |
return | array | An array of tags with the tagged service as key, holding a list of attribute arrays |
public findUnusedTags ( ) : string[] | ||
return | string[] | An array of tags |
public getAliases ( ) : |
||
return | An array of aliases |
public getCompiler ( ) : |
||
return | The compiler |
public getCompilerPassConfig ( ) : |
||
return | The compiler pass config |
public getDefinition ( string $id ) : |
||
$id | string | The service identifier |
return | A Definition instance |
public getDefinitions ( ) : |
||
return | An array of Definition instances |
public getEnvCounters ( ) : int[] | ||
return | int[] | The number of time each env vars has been resolved |
public getExpressionLanguageProviders ( ) : Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface[] | ||
return | Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface[] |
public getExtension ( string $name ) : Symfony\Component\DependencyInjection\Extension\ExtensionInterface | ||
$name | string | An alias or a namespace |
return | Symfony\Component\DependencyInjection\Extension\ExtensionInterface | An extension instance |
public getExtensionConfig ( string $name ) : array | ||
$name | string | The name of the extension |
return | array | An array of configuration |
public getExtensions ( ) : Symfony\Component\DependencyInjection\Extension\ExtensionInterface[] | ||
return | Symfony\Component\DependencyInjection\Extension\ExtensionInterface[] | An array of ExtensionInterface |
public getResources ( ) : Symfony\Component\Config\Resource\ResourceInterface[] | ||
return | Symfony\Component\Config\Resource\ResourceInterface[] | An array of resources |
public static getServiceConditionals ( mixed $value ) : array | ||
$value | mixed | An array of conditionals to return |
return | array | An array of Service conditionals |
public getServiceIds ( ) : array | ||
return | array | An array of all defined service ids |
public hasDefinition ( string $id ) : boolean | ||
$id | string | The service identifier |
return | boolean | true if the service definition exists, false otherwise |
public hasExtension ( string $name ) : boolean | ||
$name | string | The name of the extension |
return | boolean | If the extension exists |
public isTrackingResources ( ) : boolean | ||
return | boolean | true if resources are tracked, false otherwise |
public loadFromExtension ( string $extension, array $values = [] ) : |
||
$extension | string | The extension alias or namespace |
$values | array | An array of values that customizes the extension |
return | The current instance |
public merge ( |
||
$container | The ContainerBuilder instance to merge |
public prependExtensionConfig ( string $name, array $config ) | ||
$name | string | The name of the extension |
$config | array | The config to set |
public registerExtension ( Symfony\Component\DependencyInjection\Extension\ExtensionInterface $extension ) | ||
$extension | Symfony\Component\DependencyInjection\Extension\ExtensionInterface | An extension instance |
public removeAlias ( string $alias ) | ||
$alias | string | The alias to remove |
public removeDefinition ( string $id ) | ||
$id | string | The service identifier |
public resolveEnvPlaceholders ( mixed $value, string | true | null $format = null, array &$usedEnvs = null ) : string | ||
$value | mixed | The value to resolve |
$format | string | true | null | A sprintf() format returning the replacement for each env var name or null to resolve back to the original "%env(VAR)%" format or true to resolve to the actual values of the referenced env vars |
$usedEnvs | array | |
return | string | The string with env parameters resolved |
public resolveServices ( mixed $value ) : mixed | ||
$value | mixed | A value |
return | mixed | The same value with all service references replaced by the real service instances and all expressions evaluated |
public setAliases ( array $aliases ) | ||
$aliases | array | An array of aliases |
public setDefinition ( string $id, |
||
$id | string | The service identifier |
$definition | A Definition instance | |
return | the service definition |
public setDefinitions ( array $definitions ) | ||
$definitions | array | An array of service definitions |
public setProxyInstantiator ( Symfony\Component\DependencyInjection\LazyProxy\Instantiator\InstantiatorInterface $proxyInstantiator ) | ||
$proxyInstantiator | Symfony\Component\DependencyInjection\LazyProxy\Instantiator\InstantiatorInterface |
public setResourceTracking ( boolean $track ) | ||
$track | boolean | true if you want to track resources, false otherwise |
public setResources ( array $resources ) : |
||
$resources | array | An array of resources |
return | The current instance |