PHP 클래스 Vectorface\Whip\IpRange\Ipv4Range

저자: Daniel Bruce ([email protected])
상속: implements Vectorface\Whip\IpRange\IpRange
파일 보기 프로젝트 열기: vectorface/whip

공개 메소드들

메소드 설명
__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.