You are here

private function IpAddress::isIpV4 in IP address fields 8

Same name and namespace in other branches
  1. 2.0.x src/IpAddress.php \Drupal\field_ipaddress\IpAddress::isIpV4()

Checks if the given IP is valid IPv4.

2 calls to IpAddress::isIpV4()
IpAddress::getFamily in src/IpAddress.php
Find if the IP family is IPv4 or IPv6.
IpAddress::parse in src/IpAddress.php
Find if the value given is an IP, IP range, or other.

File

src/IpAddress.php, line 111

Class

IpAddress
IpTools class.

Namespace

Drupal\field_ipaddress

Code

private function isIpV4($ip) {
  return filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
}