PHP Class rock\sanitize\rules\Ip

Inheritance: extends Rule
Show file Open project: romeoz/rock-sanitize Class Usage Examples

Protected Properties

Property Type Description
$normalize

Public Methods

Method Description
__construct ( $normalize = true, $config = [] )
sanitize ( $input )

Protected Methods

Method Description
IPv6toBit ( string $ip ) : string
fillAddress ( $input, $char = '*' )
isIPv6 ( $ip )
normalize ( $ip )
rangeUsingCIDR ( string $input ) : string
rangeUsingWildcards ( $input )

Method Details

IPv6toBit() protected method

protected IPv6toBit ( string $ip ) : string
$ip string
return string

__construct() public method

public __construct ( $normalize = true, $config = [] )

fillAddress() protected method

protected fillAddress ( $input, $char = '*' )

isIPv6() protected method

protected isIPv6 ( $ip )

normalize() protected method

protected normalize ( $ip )

rangeUsingCIDR() protected method

protected rangeUsingCIDR ( string $input ) : string
$input string
return string

rangeUsingWildcards() protected method

protected rangeUsingWildcards ( $input )

sanitize() public method

public sanitize ( $input )

Property Details

$normalize protected property

protected $normalize