• 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
..
cookbook Loading commit data...
providers Loading commit data...
changelog.rst Loading commit data...
conf.py Loading commit data...
contributing.rst Loading commit data...
index.rst Loading commit data...
internals.rst Loading commit data...
intro.rst Loading commit data...
middlewares.rst Loading commit data...
organizing_controllers.rst Loading commit data...
phar.rst Loading commit data...
providers.rst Loading commit data...
services.rst Loading commit data...
testing.rst Loading commit data...
usage.rst Loading commit data...
web_servers.rst Loading commit data...