Documentation

ExpressionRequestMatcher extends RequestMatcher
in package

ExpressionRequestMatcher uses an expression to match a Request.

Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

$attributes  : array<string|int, mixed>
$expression  : mixed
$host  : string|null
$ips  : array<string|int, string>
$language  : mixed
$methods  : array<string|int, string>
$path  : string|null
$port  : int|null
$schemes  : array<string|int, string>
__construct()  : mixed
matchAttribute()  : mixed
Adds a check for request attribute.
matches()  : bool
Decides whether the rule(s) implemented by the strategy matches the supplied request.
matchHost()  : mixed
Adds a check for the URL host name.
matchIp()  : mixed
Adds a check for the client IP.
matchIps()  : mixed
Adds a check for the client IP.
matchMethod()  : mixed
Adds a check for the HTTP method.
matchPath()  : mixed
Adds a check for the URL path info.
matchPort()  : mixed
Adds a check for the URL port.
matchScheme()  : mixed
Adds a check for the HTTP scheme.
setExpression()  : mixed

Properties

Methods

__construct()

public __construct([string|null $path = null ][, string|null $host = null ][, string|array<string|int, string>|null $methods = null ][, string|array<string|int, string>|null $ips = null ][, array<string|int, mixed> $attributes = [] ][, string|array<string|int, string>|null $schemes = null ][, int|null $port = null ]) : mixed
Parameters
$path : string|null = null
$host : string|null = null
$methods : string|array<string|int, string>|null = null
$ips : string|array<string|int, string>|null = null
$attributes : array<string|int, mixed> = []
$schemes : string|array<string|int, string>|null = null
$port : int|null = null
Return values
mixed

matchAttribute()

Adds a check for request attribute.

public matchAttribute(string $key, string $regexp) : mixed
Parameters
$key : string
$regexp : string
Return values
mixed

matches()

Decides whether the rule(s) implemented by the strategy matches the supplied request.

public matches(Request $request) : bool
Parameters
$request : Request
Return values
bool

matchHost()

Adds a check for the URL host name.

public matchHost(string|null $regexp) : mixed
Parameters
$regexp : string|null
Return values
mixed

matchIp()

Adds a check for the client IP.

public matchIp(string $ip) : mixed
Parameters
$ip : string

A specific IP address or a range specified using IP/netmask like 192.168.1.0/24

Return values
mixed

matchIps()

Adds a check for the client IP.

public matchIps(string|array<string|int, string>|null $ips) : mixed
Parameters
$ips : string|array<string|int, string>|null

A specific IP address or a range specified using IP/netmask like 192.168.1.0/24

Return values
mixed

matchMethod()

Adds a check for the HTTP method.

public matchMethod(string|array<string|int, string>|null $method) : mixed
Parameters
$method : string|array<string|int, string>|null

An HTTP method or an array of HTTP methods

Return values
mixed

matchPath()

Adds a check for the URL path info.

public matchPath(string|null $regexp) : mixed
Parameters
$regexp : string|null
Return values
mixed

matchPort()

Adds a check for the URL port.

public matchPort(int|null $port) : mixed
Parameters
$port : int|null

The port number to connect to

Return values
mixed

matchScheme()

Adds a check for the HTTP scheme.

public matchScheme(string|array<string|int, string>|null $scheme) : mixed
Parameters
$scheme : string|array<string|int, string>|null

An HTTP scheme or an array of HTTP schemes

Return values
mixed

Search results