Download the PHP package draw/dependency-injection without Composer
On this page you can find all versions of the php package draw/dependency-injection. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package dependency-injection
Dependency Injection
This package provides addons to the Symfony Dependency Injection component.
Installation
Integration
The Draw\Component\DependencyInjection\Integration
namespace contains classes that can be used to easily integrate
subcomponents into a main bundle.
An example of this is all the draw components that are integrated into the DrawFrameworkExtraBundle
.
When creating the main bundle extension you can use the IntegrationTrait
to easily integrate all the subcomponents.
registerDefaultIntegrations
The registerDefaultIntegrations
method will automatically register all the integrations that are in the provideExtensionClasses
method.
It will check if the class exists and if it does it will create a new instance of it and add it to the integrations
property.
That way you can define the integration classes in the specific component, and it will automatically be integrated into the main bundle if your component is installed.
loadIntegrations
The loadIntegrations
method will call the load
method on all the integrations that are registered.
It will automatically pass the configuration to the existing configuration only if they are enabled
.
prependIntegrations
The prependIntegrations
method will call the prepend
method on all the integrations that are registered.
It will check if the configuration is enabled
and if it is it will call the prepend
method.
Configuration
Here is an example of configuration base on the example above.
This example will enable the MyComponentIntegration
and disable the MyOtherComponentIntegration
.
All versions of dependency-injection with dependencies
symfony/config Version ^6.4.0
symfony/dependency-injection Version ^6.4.0