src/Routing/Dispatcher/ClosureDispatcher.php 1 location
|
@@ 34-35 (lines=2) @@
|
| 31 |
|
*/ |
| 32 |
|
public function call() |
| 33 |
|
{ |
| 34 |
|
if ($this->route->getResponse('code') == 202) $this->route->setResponse(['code' => 200, 'message' => 'OK', 'type' => 'text/html']); |
| 35 |
|
$params = ($this->route->getParameters() == '') ? [] : $this->route->getParameters(); |
| 36 |
|
echo call_user_func_array($this->route->getTarget('closure'), $params); |
| 37 |
|
} |
| 38 |
|
|
src/Routing/Dispatcher/ControllerDispatcher.php 1 location
|
@@ 43-44 (lines=2) @@
|
| 40 |
|
array_unshift($dependencies, call_user_func_array($this->route->getTarget('di'),[$class])); |
| 41 |
|
} |
| 42 |
|
} |
| 43 |
|
if ($this->route->getResponse('code') == 202) |
| 44 |
|
$this->route->setResponse(['code' => 200, 'message' => 'OK', 'type' => 'text/html']); |
| 45 |
|
return $reflectionMethod->invokeArgs($this->getController(), $dependencies); |
| 46 |
|
} |
| 47 |
|
|