2017 © Pedro PelĂĄez
 

library silex-ioc

IoC for Silex application

image

jonsa/silex-ioc

IoC for Silex application

  • Thursday, October 8, 2015
  • by jonsa
  • Repository
  • 1 Watchers
  • 1 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Silex IoC

Class resolver for the Silex application., (*1)

This project is a bridge between Pimple IoC and the Silex Application., (*2)

Installation

Add the IoC container to your composer.json using the command line., (*3)

composer require jonsa/silex-ioc

Usage

The class resolver is registered in Silex as a ServiceProvider, (*4)

use Jonsa\PimpleResolver\ServiceProvider as PimpleResolverServiceProvider;
use Jonsa\SilexResolver\ServiceProvider as SilexResolverServiceProvider;
use Silex\Application;

$app = new Application();
$app->register(new PimpleResolverServiceProvider());
$app->register(new SilexResolverServiceProvider());

Events

The Silex event dispatcher is registered with PimpleResolver which makes it easy to inject into the resolver., (*5)

use Jonsa\PimpleResolver\Event\ClassResolvedEvent;
use Jonsa\PimpleResolver\Events as ResolverEvents;

$app->on(ResolverEvents::CLASS_RESOLVED, function (ClassResolvedEvent $event) {
    $object = $event->getResolvedObject();
    ...
});

Configuration

The ServiceProvider has one configuration parameter., (*6)

class ServiceProvider implements ServiceProviderInterface {
    public function __construct($resolveControllers = true)
    {
        ...
    }
}

$resolveControllers tells the ServiceProvider whether to replace the built-in controller resolver in Silex. If set to true controllers will be resolved out of the IoC container., (*7)

The Versions

08/10 2015

dev-master

9999999-dev

IoC for Silex application

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonas Sandström

silex ioc

08/10 2015

v0.2.0

0.2.0.0

IoC for Silex application

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonas Sandström

silex ioc

28/09 2015

v0.1.1

0.1.1.0

IoC for Silex application

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonas Sandström

silex ioc

28/09 2015

v0.1.0

0.1.0.0

IoC for Silex application

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonas Sandström

silex ioc

28/09 2015

v0.0.2

0.0.2.0

IoC for Silex application

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonas Sandström

silex ioc

28/09 2015

v0.0.1

0.0.1.0

IoC for Silex application

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonas Sandström

silex ioc