cobaia / evenement-provider
Dependecy Injection provider for Evenement to use in Silex or Cilex
dev-master
2012-08-26 19:00 UTC
Requires
- php: >=5.3.3
This package is not auto-updated.
Last update: 2025-01-04 15:49:25 UTC
README
Dependency Injection provider for Événement can be used in Silex and Cilex.
How to use in Silex:
<?php $app->register(new Cobaia\Evenement\Provider\Silex\EvenementProvider()); $app['evenement.emitter']->on('user.created', function (User $user) use ($logger) { $logger->log(sprintf("User '%s' was created.", $user->getLogin())); });
How to use in Cilex:
<?php $app->register(new Cobaia\Evenement\Provider\Cilex\EvenementProvider()); $app['evenement.emitter']->on('user.created', function (User $user) use ($logger) { $logger->log(sprintf("User '%s' was created.", $user->getLogin())); });