\Symfony\Component\HttpFoundationExpressionRequestMatcher

ExpressionRequestMatcher uses an expression to match a Request.

Summary

Methods
Properties
Constants
__construct()
matchScheme()
matchHost()
matchPath()
matchIp()
matchIps()
matchMethod()
matchAttribute()
matches()
setExpression()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$path
$host
$methods
$ips
$attributes
$schemes
$language
$expression
N/A

Properties

$path

$path : string|null

Type

string|null

$host

$host : string|null

Type

string|null

$methods

$methods : array<mixed,string>

Type

array<mixed,string>

$ips

$ips : array<mixed,string>

Type

array<mixed,string>

$attributes

$attributes : array

Type

array

$schemes

$schemes : array<mixed,string>

Type

array<mixed,string>

$language

$language : 

Type

$expression

$expression : 

Type

Methods

__construct()

__construct(string|null  $path = null, string|null  $host = null, string|array<mixed,string>|null  $methods = null, string|array<mixed,string>|null  $ips = null, array  $attributes = array(), string|array<mixed,string>|null  $schemes = null) 

Parameters

string|null $path
string|null $host
string|array<mixed,string>|null $methods
string|array<mixed,string>|null $ips
array $attributes
string|array<mixed,string>|null $schemes

matchScheme()

matchScheme(string|array<mixed,string>|null  $scheme) 

Adds a check for the HTTP scheme.

Parameters

string|array<mixed,string>|null $scheme

An HTTP scheme or an array of HTTP schemes

matchHost()

matchHost(string|null  $regexp) 

Adds a check for the URL host name.

Parameters

string|null $regexp

A Regexp

matchPath()

matchPath(string|null  $regexp) 

Adds a check for the URL path info.

Parameters

string|null $regexp

A Regexp

matchIp()

matchIp(string  $ip) 

Adds a check for the client IP.

Parameters

string $ip

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

matchIps()

matchIps(string|array<mixed,string>|null  $ips) 

Adds a check for the client IP.

Parameters

string|array<mixed,string>|null $ips

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

matchMethod()

matchMethod(string|array<mixed,string>|null  $method) 

Adds a check for the HTTP method.

Parameters

string|array<mixed,string>|null $method

An HTTP method or an array of HTTP methods

matchAttribute()

matchAttribute(string  $key, string  $regexp) 

Adds a check for request attribute.

Parameters

string $key

The request attribute name

string $regexp

A Regexp

matches()

matches(\Symfony\Component\HttpFoundation\Request  $request) : boolean

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

Parameters

\Symfony\Component\HttpFoundation\Request $request

Returns

boolean —

true if the request matches, false otherwise

setExpression()

setExpression(\Symfony\Component\ExpressionLanguage\ExpressionLanguage  $language,   $expression) 

Parameters

\Symfony\Component\ExpressionLanguage\ExpressionLanguage $language
$expression