This PR updates Dispatcher class, so that it can optionally pull commands from container-interop-compatible container.
Usage:
$serviceManager = new ServiceManager(/* ... */);
$dispatcher = new Dispatcher($serviceManager);
$application = new Application('App', 1.0, $routes, null, $dispatcher);
After configuration, you can specify valid identifier as route handler, and Dispatcher will try to retrieve it when route is matched. This can help to lazily load complex command objects requiring configuration via factory.
This PR updates
Dispatcher
class, so that it can optionally pull commands fromcontainer-interop
-compatible container.Usage:
After configuration, you can specify valid identifier as route
handler
, andDispatcher
will try to retrieve it when route is matched. This can help to lazily load complex command objects requiring configuration via factory.Solves #15.