0 follower

Final Class Yiisoft\Router\MatchingResult

InheritanceYiisoft\Router\MatchingResult

Method Details

Hide inherited methods

arguments() public method

public arguments( ): string[]

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

            
fromFailure() public static method

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

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

            
fromSuccess() public static method

public static fromSuccess( Yiisoft\Router\Route $route, string[] $arguments ): self
$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 isMethodFailure( ): boolean

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

            
isSuccess() public method

public isSuccess( ): boolean

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

            
methods() public method

public methods( ): string[]

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

            
route() public method

public route( ): Yiisoft\Router\Route

                public function route(): Route
{
    if ($this->route === null) {
        throw new RuntimeException('There is no route in the matching result.');
    }
    return $this->route;
}