for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Whitelist\Definition;
use Exception;
use IpUtils\Factory;
/**
* Represents an IP address definition
*
* @author Sam Stenvall <[email protected]>
* @copyright Copyright © Sam Stenvall 2014-
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/
abstract class IPAddress extends Definition
{
public function match($value)
try {
$address = Factory::getAddress($this->_definition);
$otherAddress = Factory::getExpression($value);
return $address->matches($otherAddress);
} catch (Exception $e) {
unset($e);
return false;
}