. */ /** * Doctrine_Validator_Ip * * @package Doctrine * @subpackage Validator * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.phpdoctrine.org * @since 1.0 * @version $Revision: 3882 $ * @author Konsta Vesterinen */ class Doctrine_Validator_Ip { /** * checks if given value is valid ip address * * @param mixed $value * @return boolean */ public function validate($value) { return (bool) ip2long(str_replace("\0", '', $value)); } }