PHP Класс Vectorface\Whip\IpRange\Ipv4Range

Автор: Daniel Bruce ([email protected])
Наследование: implements Vectorface\Whip\IpRange\IpRange
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( string $range ) Constructor for the class.
containsIp ( string $ipAddress ) : boolean Returns whether or not a given IP address falls within this range.
getLowerInt ( ) : integer Returns the lower value of the IPv4 range as a long integer.
getUpperInt ( ) : integer Returns the upper value of the IPv4 range as a long integer.

Приватные методы

Метод Описание
computeLowerAndUpperBounds ( string $range ) Computes the lower and upper bounds of the IPv4 range by parsing the range string.
parseCidrRange ( string $range ) : array Parses a CIDR notation range.
parseHyphenRange ( string $range ) : array Parses a hyphen notation range.
parseWildcardRange ( string $range, integer $pos ) : array Parses a wildcard notation range.

Описание методов

__construct() публичный Метод

Constructor for the class.
public __construct ( string $range )
$range string A valid IPv4 range as a string. Supported range styles: - CIDR notation (127.0.0.1/24) - hyphen notation (127.0.0.1-127.0.0.255) - wildcard notation (127.0.0.*) - a single specific IP address (127.0.0.1)

containsIp() публичный Метод

Returns whether or not a given IP address falls within this range.
public containsIp ( string $ipAddress ) : boolean
$ipAddress string The given IP address.
Результат boolean Returns true if the IP address falls within the range and false otherwise.

getLowerInt() публичный Метод

Returns the lower value of the IPv4 range as a long integer.
public getLowerInt ( ) : integer
Результат integer The lower value of the IPv4 range.

getUpperInt() публичный Метод

Returns the upper value of the IPv4 range as a long integer.
public getUpperInt ( ) : integer
Результат integer The upper value of the IPv4 range.