com\setasign\SetaFramework\Router\Route

RouteInterface Class RouteInterface

File: /SetaFramework/src/Router/Route/RouteInterface.php

Implemented in

Implements

  • \Psr\Log\LoggerAwareInterface

Summary

Methods

match()

abstract public RouteInterface::match (
\Psr\Http\Message\RequestInterface $request
): ?array

Checks whether this route matches to the request

Parameters
$request : \Psr\Http\Message\RequestInterface
 
Return Values

Returns associative array(without any numeric key) with values or NULL if the route not match

setDefaultValue()

abstract public RouteInterface::setDefaultValue (
string $key,
mixed $value
): void

Sets a key of the defaultValues array

Parameters
$key : string

The key shouldn't be a natural number

$value : mixed
 

setDefaultValues()

abstract public RouteInterface::setDefaultValues (
array<string, mixed> $defaultValues
): void

Overwrites the defaultValues array

Parameters
$defaultValues : array<string, mixed>

The keys of this array shouldn't be natural numbers

setLogger()

abstract public \Psr\Log\LoggerAwareInterface::setLogger (
\Psr\Log\LoggerInterface $logger
): void

Sets a logger instance on the object.

Parameters
$logger : \Psr\Log\LoggerInterface