PHP Class Symfony\Component\HttpFoundation\RequestMatcher

Author: Fabien Potencier ([email protected])
Inheritance: implements Symfony\Component\HttpFoundation\RequestMatcherInterface
Show file Open project: pmjones/php-framework-benchmarks Class Usage Examples

Protected Properties

Property Type Description
$attributes
$host
$ip
$methods
$path

Public Methods

Method Description
matchAttribute ( string $key, string $regexp ) Adds a check for request attribute.
matchHost ( string $regexp ) Adds a check for the URL host name.
matchIp ( string $ip ) Adds a check for the client IP.
matchMethod ( $method ) Adds a check for the HTTP method.
matchPath ( string $regexp ) Adds a check for the URL path info.
matches ( Request $request )

Protected Methods

Method Description
checkIp ( $ip )

Method Details

checkIp() protected method

protected checkIp ( $ip )

matchAttribute() public method

Adds a check for request attribute.
public matchAttribute ( string $key, string $regexp )
$key string The request attribute name
$regexp string A Regexp

matchHost() public method

Adds a check for the URL host name.
public matchHost ( string $regexp )
$regexp string A Regexp

matchIp() public method

Adds a check for the client IP.
public matchIp ( string $ip )
$ip string A specific IP address or a range specified using IP/netmask like 192.168.1.0/24

matchMethod() public method

Adds a check for the HTTP method.
public matchMethod ( $method )

matchPath() public method

Adds a check for the URL path info.
public matchPath ( string $regexp )
$regexp string A Regexp

matches() public method

public matches ( Request $request )
$request Request

Property Details

$attributes protected property

protected $attributes

$host protected property

protected $host

$ip protected property

protected $ip

$methods protected property

protected $methods

$path protected property

protected $path