Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403]
1 <?php 2 3 namespace GeoIp2\Model; 4 5 use GeoIp2\Util; 6 7 /** 8 * This class provides the GeoIP2 Domain model. 9 * 10 * @property-read string|null $domain The second level domain associated with the 11 * IP address. This will be something like "example.com" or 12 * "example.co.uk", not "foo.example.com". 13 * @property-read string $ipAddress The IP address that the data in the model is 14 * for. 15 * @property-read string $network The network in CIDR notation associated with 16 * the record. In particular, this is the largest network where all of the 17 * fields besides $ipAddress have the same value. 18 */ 19 class Domain extends AbstractModel 20 { 21 protected $domain; 22 protected $ipAddress; 23 protected $network; 24 25 /** 26 * @ignore 27 * 28 * @param mixed $raw 29 */ 30 public function __construct($raw) 31 { 32 parent::__construct($raw); 33 34 $this->domain = $this->get('domain'); 35 $ipAddress = $this->get('ip_address'); 36 $this->ipAddress = $ipAddress; 37 $this->network = Util::cidr($ipAddress, $this->get('prefix_len')); 38 } 39 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body