[ Index ] |
PHP Cross Reference of phpBB-3.1.12-deutsch |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 1091 lines (32 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
ContainerBuilder:: (51 methods):
setResourceTracking()
isTrackingResources()
setProxyInstantiator()
registerExtension()
getExtension()
getExtensions()
hasExtension()
getResources()
addResource()
setResources()
addObjectResource()
addClassResource()
loadFromExtension()
addCompilerPass()
getCompilerPassConfig()
getCompiler()
getScopes()
getScopeChildren()
set()
removeDefinition()
has()
get()
merge()
getExtensionConfig()
prependExtensionConfig()
compile()
getServiceIds()
addAliases()
setAliases()
setAlias()
removeAlias()
hasAlias()
getAliases()
getAlias()
register()
addDefinitions()
setDefinitions()
getDefinitions()
setDefinition()
hasDefinition()
getDefinition()
findDefinition()
createService()
resolveServices()
findTaggedServiceIds()
findTags()
getServiceConditionals()
getProxyInstantiator()
synchronize()
callMethod()
shareService()
Class: ContainerBuilder - X-Ref
ContainerBuilder is a DI container that provides an API to easily describe services.setResourceTracking($track) X-Ref |
Sets the track resources flag. If you are not using the loaders and therefore don't want to depend on the Config component, set this flag to false. param: bool $track true if you want to track resources, false otherwise |
isTrackingResources() X-Ref |
Checks if resources are tracked. return: bool true if resources are tracked, false otherwise |
setProxyInstantiator(InstantiatorInterface $proxyInstantiator) X-Ref |
Sets the instantiator to be used when fetching proxies. param: InstantiatorInterface $proxyInstantiator |
registerExtension(ExtensionInterface $extension) X-Ref |
Registers an extension. param: ExtensionInterface $extension An extension instance |
getExtension($name) X-Ref |
Returns an extension by alias or namespace. param: string $name An alias or a namespace return: ExtensionInterface An extension instance |
getExtensions() X-Ref |
Returns all registered extensions. return: ExtensionInterface[] An array of ExtensionInterface |
hasExtension($name) X-Ref |
Checks if we have an extension. param: string $name The name of the extension return: bool If the extension exists |
getResources() X-Ref |
Returns an array of resources loaded to build this configuration. return: ResourceInterface[] An array of resources |
addResource(ResourceInterface $resource) X-Ref |
Adds a resource for this configuration. param: ResourceInterface $resource A resource instance return: ContainerBuilder The current instance |
setResources(array $resources) X-Ref |
Sets the resources for this configuration. param: ResourceInterface[] $resources An array of resources return: ContainerBuilder The current instance |
addObjectResource($object) X-Ref |
Adds the object class hierarchy as resources. param: object $object An object instance return: ContainerBuilder The current instance |
addClassResource(\ReflectionClass $class) X-Ref |
Adds the given class hierarchy as resources. param: \ReflectionClass $class return: ContainerBuilder The current instance |
loadFromExtension($extension, array $values = array() X-Ref |
Loads the configuration for an extension. param: string $extension The extension alias or namespace param: array $values An array of values that customizes the extension return: ContainerBuilder The current instance |
addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION) X-Ref |
Adds a compiler pass. param: CompilerPassInterface $pass A compiler pass param: string $type The type of compiler pass return: ContainerBuilder The current instance |
getCompilerPassConfig() X-Ref |
Returns the compiler pass config which can then be modified. return: PassConfig The compiler pass config |
getCompiler() X-Ref |
Returns the compiler. return: Compiler The compiler |
getScopes() X-Ref |
Returns all Scopes. return: array An array of scopes |
getScopeChildren() X-Ref |
Returns all Scope children. return: array An array of scope children. |
set($id, $service, $scope = self::SCOPE_CONTAINER) X-Ref |
Sets a service. param: string $id The service identifier param: object $service The service instance param: string $scope The scope |
removeDefinition($id) X-Ref |
Removes a service definition. param: string $id The service identifier |
has($id) X-Ref |
Returns true if the given service is defined. param: string $id The service identifier return: bool true if the service is defined, false otherwise |
get($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) X-Ref |
Gets a service. param: string $id The service identifier param: int $invalidBehavior The behavior when the service does not exist return: object The associated service |
merge(ContainerBuilder $container) X-Ref |
Merges a ContainerBuilder with the current ContainerBuilder configuration. Service definitions overrides the current defined ones. But for parameters, they are overridden by the current ones. It allows the parameters passed to the container constructor to have precedence over the loaded ones. $container = new ContainerBuilder(array('foo' => 'bar')); $loader = new LoaderXXX($container); $loader->load('resource_name'); $container->register('foo', new stdClass()); In the above example, even if the loaded resource defines a foo parameter, the value will still be 'bar' as defined in the ContainerBuilder constructor. param: ContainerBuilder $container The ContainerBuilder instance to merge. |
getExtensionConfig($name) X-Ref |
Returns the configuration array for the given extension. param: string $name The name of the extension return: array An array of configuration |
prependExtensionConfig($name, array $config) X-Ref |
Prepends a config array to the configs of the given extension. param: string $name The name of the extension param: array $config The config to set |
compile() X-Ref |
Compiles the container. This method passes the container to compiler passes whose job is to manipulate and optimize the container. The main compiler passes roughly do four things: * The extension configurations are merged; * Parameter values are resolved; * The parameter bag is frozen; * Extension loading is disabled. |
getServiceIds() X-Ref |
Gets all service ids. return: array An array of all defined service ids |
addAliases(array $aliases) X-Ref |
Adds the service aliases. param: array $aliases An array of aliases |
setAliases(array $aliases) X-Ref |
Sets the service aliases. param: array $aliases An array of aliases |
setAlias($alias, $id) X-Ref |
Sets an alias for an existing service. param: string $alias The alias to create param: string|Alias $id The service to alias |
removeAlias($alias) X-Ref |
Removes an alias. param: string $alias The alias to remove |
hasAlias($id) X-Ref |
Returns true if an alias exists under the given identifier. param: string $id The service identifier return: bool true if the alias exists, false otherwise |
getAliases() X-Ref |
Gets all defined aliases. return: Alias[] An array of aliases |
getAlias($id) X-Ref |
Gets an alias. param: string $id The service identifier return: Alias An Alias instance |
register($id, $class = null) X-Ref |
Registers a service definition. This methods allows for simple registration of service definition with a fluid interface. param: string $id The service identifier param: string $class The service class return: Definition A Definition instance |
addDefinitions(array $definitions) X-Ref |
Adds the service definitions. param: Definition[] $definitions An array of service definitions |
setDefinitions(array $definitions) X-Ref |
Sets the service definitions. param: Definition[] $definitions An array of service definitions |
getDefinitions() X-Ref |
Gets all service definitions. return: Definition[] An array of Definition instances |
setDefinition($id, Definition $definition) X-Ref |
Sets a service definition. param: string $id The service identifier param: Definition $definition A Definition instance return: Definition the service definition |
hasDefinition($id) X-Ref |
Returns true if a service definition exists under the given identifier. param: string $id The service identifier return: bool true if the service definition exists, false otherwise |
getDefinition($id) X-Ref |
Gets a service definition. param: string $id The service identifier return: Definition A Definition instance |
findDefinition($id) X-Ref |
Gets a service definition by id or alias. The method "unaliases" recursively to return a Definition instance. param: string $id The service identifier or alias return: Definition A Definition instance |
createService(Definition $definition, $id, $tryProxy = true) X-Ref |
Creates a service for a service definition. param: Definition $definition A service definition instance param: string $id The service identifier param: bool $tryProxy Whether to try proxying the service with a lazy proxy return: object The service described by the service definition |
resolveServices($value) X-Ref |
Replaces service references by the real service instance. param: mixed $value A value return: mixed The same value with all service references replaced by the real service instances |
findTaggedServiceIds($name) X-Ref |
Returns service ids for a given tag. Example: $container->register('foo')->addTag('my.tag', array('hello' => 'world')); $serviceIds = $container->findTaggedServiceIds('my.tag'); foreach ($serviceIds as $serviceId => $tags) { foreach ($tags as $tag) { echo $tag['hello']; } } param: string $name The tag name return: array An array of tags with the tagged service as key, holding a list of attribute arrays. |
findTags() X-Ref |
Returns all tags the defined services use. return: array An array of tags |
getServiceConditionals($value) X-Ref |
Returns the Service Conditionals. param: mixed $value An array of conditionals to return. return: array An array of Service conditionals |
getProxyInstantiator() X-Ref |
Retrieves the currently set proxy instantiator or instantiates one. return: InstantiatorInterface |
synchronize($id) X-Ref |
Synchronizes a service change. This method updates all services that depend on the given service by calling all methods referencing it. param: string $id A service id |
callMethod($service, $call) X-Ref |
No description |
shareService(Definition $definition, $service, $id) X-Ref |
Shares a given service in the container. param: Definition $definition param: mixed $service param: string $id |
Generated: Thu Jan 11 00:25:41 2018 | Cross-referenced by PHPXref 0.7.1 |