PHP Class Neos\Flow\Security\RequestPattern\Ip

The pattern can contain IPv4 and IPv6 addresses (including IPv6 wrapped IPv4 addresses).
See also: http://tools.ietf.org/html/rfc4632
See also: http://tools.ietf.org/html/rfc4291#section-2.3 Example: 127.0.0.0/24 will match all IP addresses from 127.0.0.0 to 127.0.0.255 127.0.0.0/31 and 127.0.0.1/31 will both match the IP addresses 127.0.0.0 and 127.0.0.1 127.0.0.254/31 and 127.0.0.255/31 will both match the IP addresses 127.0.0.254 and 127.0.0.255 1:2::3:4 will match the IPv6 address written as 1:2:0:0:0:0:3:4 or 1:2::3:4 ::7F00:1 will match the address written as 127.0.0.1, ::127.0.0.1 or ::7F00:1 ::1 (IPv6 loopback) will *not* match the address 127.0.0.1
Inheritance: implements Neos\Flow\Security\RequestPatternInterface
Mostra file Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$options array

Public Methods

Method Description
__construct ( array $options ) Expects options in the form array('cidrPattern' => '')
matchRequest ( Neos\Flow\Mvc\RequestInterface $request ) : boolean Matches a \Neos\Flow\Mvc\RequestInterface against the set IP pattern rules
setPattern ( string $ipPattern ) : void Sets an IP pattern (CIDR syntax)

Method Details

__construct() public method

Expects options in the form array('cidrPattern' => '')
public __construct ( array $options )
$options array

matchRequest() public method

Matches a \Neos\Flow\Mvc\RequestInterface against the set IP pattern rules
public matchRequest ( Neos\Flow\Mvc\RequestInterface $request ) : boolean
$request Neos\Flow\Mvc\RequestInterface The request that should be matched
return boolean TRUE if the pattern matched, FALSE otherwise

setPattern() public method

Sets an IP pattern (CIDR syntax)
Deprecation: since 3.3 this is not used - use options instead (@see __construct())
public setPattern ( string $ipPattern ) : void
$ipPattern string The CIDR styled IP pattern
return void

Property Details

$options protected_oe property

protected array $options
return array