Download the PHP package fpeters/sf-dependency-injection-plugin without Composer
On this page you can find all versions of the php package fpeters/sf-dependency-injection-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fpeters/sf-dependency-injection-plugin
More information about fpeters/sf-dependency-injection-plugin
Files in fpeters/sf-dependency-injection-plugin
Package sf-dependency-injection-plugin
Short Description Add Support for Symfony's DependencyInjection component to your symfony1.x project
License MIT
Informations about the package sf-dependency-injection-plugin
sfDependencyInjectionPlugin
It provides supporting the Symfony's DependencyInjection component in your older symfony (1.4) project with Composer.
This Plugin is inspired by https://github.com/issei-m/sfDependencyInjectionPlugin but uses some other approach to load the configuration files.
Installation
Create the following composer.json
in your symfony 1.4 project's root.
Here, Composer would install the plugin in your plugins
directory and some Symfony2 components into vendor/symfony/
.
Also, You can locate your PSR supported libraries to be auto-loaded in %SF_ROOT%/psr
(optional).
Install the Composer and install some libraries.
To register the autoloader for libraries installed with composer, you must add this at the top of your ProjectConfiguration class:
Usage
The Plugin only creates an empty ContainerBuilder object.To add your service configuration, simply listen for the service_container.load_configuration event in your ProjectConfiguration. The following example will load the services.yml from the global config directory
You can do nearly anything with this ContainerBuilder. So maybe have a look at documentation: http://symfony.com/doc/current/components/dependency_injection/compilation.html
To use a Service in your Code, simply call the Service Container.
This will also work in your Templates anc Components.
All versions of sf-dependency-injection-plugin with dependencies
symfony/config Version 2.3.*
composer/installers Version ~1.0.0