Skip to content

Commit ab567a0

Browse files
authored
feature: pass nullable int as the error status (#74)
closes #73
1 parent 4e0519d commit ab567a0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/BaseRouter.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ abstract class BaseRouter {
2727
private Injector $injector;
2828
private string $viewClassName;
2929
private bool $routeCompleted;
30+
protected ?int $errorStatus;
3031

3132
public function __construct(
3233
null|ConfigSection|RouterConfig $routerConfig = null,
3334
?Assembly $viewAssembly = null,
3435
?Assembly $logicAssembly = null,
36+
?int $errorStatus = null,
3537
) {
3638
if($routerConfig instanceof ConfigSection) {
3739
trigger_deprecation(
@@ -52,6 +54,7 @@ public function __construct(
5254
$this->viewAssembly = $viewAssembly ?? new Assembly();
5355
$this->logicAssembly = $logicAssembly ?? new Assembly();
5456
$this->routeCompleted = false;
57+
$this->errorStatus = $errorStatus;
5558
}
5659

5760
public function setContainer(Container $container):void {

0 commit comments

Comments
 (0)