for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Safelist\Definition;
/**
* 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 = \IpUtils\Factory::getAddress($this->_definition);
$otherAddress = \IpUtils\Factory::getExpression($value);
return $address->matches($otherAddress);
}
catch (\Exception $e)
unset($e);
return false;