src/IpRange/IpWhitelist.php
public function isIpWhitelisted($ipAddress)
    {
        // determine whether this IP is IPv4 or IPv6
        $isIpv4Address = filter_var($ipAddress, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
        return $this->isIpInWhitelist(
            ($isIpv4Address) ? $this->ipv4Whitelist : $this->ipv6Whitelist,
            $ipAddress
        );
    }
public function isIpWhitelisted($ipAddress)
    {
        // determine whether this IP is IPv4 or IPv6
        $isIpv4Address = filter_var($ipAddress, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
        return $this->isIpInWhitelist(
            ($isIpv4Address) ? $this->ipv4Whitelist : $this->ipv6Whitelist,
            $ipAddress
        );
    }
public function isIpWhitelisted ( $ ipAddress ) { // determine whether this IP is IPv4 or IPv6 $ isIpv4Address = filter_var ( $ ipAddress , FILTER_VALIDATE_IP , FILTER_FLAG_IPV4 ) ; return $ this -> isIpInWhitelist ( ( $ isIpv4Address ) ? $ this -> ipv4Whitelist : $ this -> ipv6Whitelist , $ ipAddress ) ; }
Returns whether or not the given IP address is within the whitelist.
@param string $ipAddress A valid IPv4 or IPv6 address.
@return boolean Returns true if the IP address matches one of the
whitelisted IP ranges and false otherwise.
Returns whether or not the given IP address is within the whitelist .