Skip to content

Commit

Permalink
Fix #37: Add debug info to Route for debugging (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
rustamwin committed Nov 4, 2021
1 parent a345631 commit 3a1ac06
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Route.php
Expand Up @@ -311,4 +311,20 @@ public function hasMiddlewares(): bool
{
return $this->middlewareDefinitions !== [];
}

public function __debugInfo()
{
return [
'name' => $this->name,
'methods' => $this->methods,
'pattern' => $this->pattern,
'host' => $this->host,
'defaults' => $this->defaults,
'override' => $this->override,
'actionAdded' => $this->actionAdded,
'middlewareDefinitions' => $this->middlewareDefinitions,
'disabledMiddlewareDefinitions' => $this->disabledMiddlewareDefinitions,
'middlewareDispatcher' => $this->dispatcher,
];
}
}

0 comments on commit 3a1ac06

Please sign in to comment.