cekurte / silex-manager-provider
A silex service provider that adds Manager to loader other service providers
v0.0.5
2015-12-07 11:57 UTC
Requires
- php: >=5.5
- silex/silex: ^1.3
Requires (Dev)
- cekurte/tdd: ^1.0
- phpunit/phpunit: ^4.8
- sensiolabs/security-checker: ^3.0
- sjparkinson/static-review: ^5.1
- squizlabs/php_codesniffer: ^2.3
This package is auto-updated.
Last update: 2024-11-16 03:20:47 UTC
README
- A simple silex service provider (covered by php unit tests) that adds a Manager to register other Service Providers to increase the power of your application, contribute with this project!
Installation
The package is available on Packagist. The source files is PSR-2 compatible. Autoloading is PSR-4 compatible.
composer require cekurte/silex-manager-provider
Documentation
To use this library you need register the Cekurte\Silex\Manager\Provider\ManagerServiceProvider. See also the library Environment cekurte/environment.
<?php use Cekurte\Environment\Environment; use Cekurte\Silex\Manager\Provider\ManagerServiceProvider; // ... $app['cekurte.manager.providers'] = [ // ... 'Silex\Provider\SessionServiceProvider' => [ 'register' => true, ], 'Silex\Provider\SwiftmailerServiceProvider' => [ 'register' => true, 'type' => 'array', 'src' => [ 'swiftmailer.use_spool' => Environment::get('SWIFTMAILER_USE_SPOOL'), 'swiftmailer.options' => [ 'host' => Environment::get('SMTP_HOST'), 'port' => Environment::get('SMTP_PORT'), 'username' => Environment::get('SMTP_USERNAME'), 'password' => Environment::get('SMTP_PASSWORD'), 'encryption' => Environment::get('SMTP_ENCRYPTION'), 'auth_mode' => Environment::get('SMTP_AUTH_MODE'), ], ], ], // ... ]; $app->register(new ManagerServiceProvider()); // ...
If you liked of this library, give me a star =).
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Make your changes
- Run the tests, adding new ones for your own code if necessary (
vendor/bin/phpunit
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request