• Fabien Potencier's avatar
    feature #864 allowed any callback to be a method call on a service (a:b notation) (fabpot) · 282628dc
    Fabien Potencier authored
    This PR was merged into the master branch.
    
    Discussion
    ----------
    
    allowed any callback to be a method call on a service (a:b notation)
    
    #800 added the possibility to use a service method (with the `a:b` notation) for converters. This PR goes one step further by allowing almost all methods accepting a callback to use a service method.
    
    The following is now possible:
    
    ```php
    $app->before('service:beforeApp');
    $app->after('service:afterApp');
    $app->finish('service:finishApp');
    $app->error('service:error');
    $app->on('kernel.request', 'service:onRequest');
    
    $app
        ->match('/', 'service:controller')
        ->convert('foo', 'service:convert')
        ->before('service:before')
        ->after('service:after')
    ;
    ```
    
    Commits
    -------
    
    87f5e203 allowed any callback to be a method call on a service (a:b notation)
    282628dc
Name
Last commit
Last update
bin Loading commit data...
doc Loading commit data...
src/Silex Loading commit data...
tests Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
composer.json Loading commit data...
phpunit.xml.dist Loading commit data...