com\setasign\SetaFramework\Router\Route

MultiCondition Class Route MultiCondition

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

Class hierarchy

Implements

Summary

Properties

$defaultValues

protected array<string, mixed> MultiCondition::$defaultValues

$logger

protected ?\Psr\Log\LoggerInterface MultiCondition::$logger

Methods

__construct()

public MultiCondition::__construct (
RouteInterface[] $routes,
array<string, mixed> $defaultValues = array ( )
)
Parameters
$routes : RouteInterface[]
 
$defaultValues : array<string, mixed>
 

match()

public MultiCondition::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()

public MultiCondition::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()

public MultiCondition::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()

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

Sets a logger instance on the object.

Parameters
$logger : \Psr\Log\LoggerInterface