explain implementation of ad-hoc depencency container
This commit is contained in:
parent
7dd6b2dab5
commit
dfb3f0aee0
8 changed files with 297 additions and 250 deletions
|
@ -59,7 +59,7 @@ try {
|
|||
switch ($routeInfo[0]) {
|
||||
case Dispatcher::FOUND:
|
||||
$className = $routeInfo[1];
|
||||
$handler = new $className($response);
|
||||
$handler = $container->get($className);
|
||||
assert($handler instanceof RequestHandlerInterface);
|
||||
foreach ($routeInfo[2] as $attributeName => $attributeValue) {
|
||||
$request = $request->withAttribute($attributeName, $attributeValue);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue