Page MenuHomePhabricator

final class PhutilCIDRList
Arcanist Technical Documentation ()

List of CIDR notation IP blocks, like "172.30.0.0/16".

This class is primarily useful for managing IP whitelists or blacklists. For example, you can check if an address is on a subnet like this:

$whitelist = PhutilCIDRList::newList(array('172.30.0.0/16'));
$ok = $whitelist->containsAddrsss('172.30.0.1');

Methods

private function __construct()

This method is not documented.
Return
this//Implicit.//

public static function newList($blocks)

This method is not documented.
Parameters
array$blocks
Return
wild

public function containsAddress($address)

This method is not documented.
Parameters
$address
Return
wild