Final Class Yiisoft\Router\MatchingResult
| Inheritance | Yiisoft\ |
|---|
Public Methods
Method Details
| public static self fromFailure ( string[] $methods ) | ||
| $methods | string[] | |
public static function fromFailure(array $methods): self
{
$new = new self(null);
$new->methods = $methods;
return $new;
}
| public static self fromSuccess ( Yiisoft\ | ||
| $route | Yiisoft\ |
|
| $arguments | string[] | |
public static function fromSuccess(Route $route, array $arguments): self
{
$new = new self($route);
$new->arguments = $arguments;
return $new;
}
| public boolean isMethodFailure ( ) |
public function isMethodFailure(): bool
{
return $this->route === null && $this->methods !== Method::ALL;
}
| public Yiisoft\ |
public function route(): Route
{
if ($this->route === null) {
throw new RuntimeException('There is no route in the matching result.');
}
return $this->route;
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.