Download the PHP package blackscorp/lazy-before-after-service-provider without Composer
On this page you can find all versions of the php package blackscorp/lazy-before-after-service-provider. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download blackscorp/lazy-before-after-service-provider
More information about blackscorp/lazy-before-after-service-provider
Files in blackscorp/lazy-before-after-service-provider
Download blackscorp/lazy-before-after-service-provider
More information about blackscorp/lazy-before-after-service-provider
Files in blackscorp/lazy-before-after-service-provider
Vendor blackscorp
Package lazy-before-after-service-provider
Short Description A service Provider for Silex to call before/after methods automatically
License Mit
Package lazy-before-after-service-provider
Short Description A service Provider for Silex to call before/after methods automatically
License Mit
Please rate this library. Is it a good library?
Informations about the package lazy-before-after-service-provider
LazyBeforeAfterServiceProvier
A service Provider for Silex to call before/after methods automatically.
Usage
Your bootstrap may look like this
<?php
$app = new Application();
$app->register(new ServiceControllerServiceProvider());
$app->register(new LazyBeforeAfterServiceProvider());
$app['controller'] = $app->share(function(){
return MyController();
});
$app->get('/','controller:indexAction');
Now you can just add methods like "before", "after","before{MethodName}" and "after{MethodName}" without to specify it in your Router.
This is the same like
$app->get('/','controller:indexAction')
->before(function(){
//some logic
})->after(function(){
//some logic
});
But with the ability to do your checks in a "Base" Controller and extend from it.
The Provider Call the methods in following Order:
- Before
- BeforeAction
- Action(Called by Silex)
- AfterAction
- After
All versions of lazy-before-after-service-provider with dependencies
PHP Build Version
Package Version
Requires
silex/silex Version
~1.0
The package blackscorp/lazy-before-after-service-provider contains the following files
Loading the files please wait ....