0 follower

Final Class Yiisoft\Router\MatchingResult

InheritanceYiisoft\Router\MatchingResult

Method Details

Hide inherited methods

arguments() public method

public string[] arguments ( )

                public function arguments(): array
{
    return $this->arguments;
}

            
fromFailure() public static method

public static self fromFailure ( string[] $methods )
$methods string[]

                public static function fromFailure(array $methods): self
{
    $new = new self(null);
    $new->methods = $methods;
    return $new;
}

            
fromSuccess() public static method

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;
}

            
isMethodFailure() public method

public boolean isMethodFailure ( )

                public function isMethodFailure(): bool
{
    return $this->route === null && $this->methods !== Method::ALL;
}

            
isSuccess() public method

public boolean isSuccess ( )

                public function isSuccess(): bool
{
    return $this->route !== null;
}

            
methods() public method

public string[] methods ( )

                public function methods(): array
{
    return $this->methods;
}

            
route() public method

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;
}