Final Class Yiisoft\Router\MatchingResult
| Inheritance | Yiisoft\Router\MatchingResult |
|---|
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\Router\Route $route, string[] $arguments ) | ||
| $route | Yiisoft\Router\Route | |
| $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\Router\Route route ( ) |
public function route(): Route
{
if ($this->route === null) {
throw new RuntimeException('There is no route in the matching result.');
}
return $this->route;
}
Signup or Login in order to comment.