Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.
<?php

declare(strict_types=1);

namespace GeoIp2\Model;

use GeoIp2\Util;

/**
 * This class provides the GeoIP2 ISP model.
 *
 * @property-read int|null $autonomousSystemNumber The autonomous system number
 *     associated with the IP address.
 * @property-read string|null $autonomousSystemOrganization The organization
 *     associated with the registered autonomous system number for the IP
 *     address.
 * @property-read string|null $isp The name of the ISP associated with the IP
 *     address.
> * @property-read string|null $mobileCountryCode The [mobile country code * @property-read string|null $organization The name of the organization associated > * (MCC)](https://en.wikipedia.org/wiki/Mobile_country_code) associated with * with the IP address. > * the IP address and ISP. * @property-read string $ipAddress The IP address that the data in the model is > * @property-read string|null $mobileNetworkCode The [mobile network code * for. > * (MNC)](https://en.wikipedia.org/wiki/Mobile_country_code) associated with * @property-read string $network The network in CIDR notation associated with > * the IP address and ISP.
* the record. In particular, this is the largest network where all of the * fields besides $ipAddress have the same value. */ class Isp extends AbstractModel {
> /** protected $autonomousSystemNumber; > * @var int|null protected $autonomousSystemOrganization; > */
protected $isp;
> protected $organization; > /** protected $ipAddress; > * @var string|null protected $network; > */
> /** > /** * @ignore > * @var string|null */ > */
public function __construct(array $raw)
> { > /** parent::__construct($raw); > * @var string|null $this->autonomousSystemNumber = $this->get('autonomous_system_number'); > */ $this->autonomousSystemOrganization = > protected $mobileCountryCode; $this->get('autonomous_system_organization'); > $this->isp = $this->get('isp'); > /** $this->organization = $this->get('organization'); > * @var string|null > */ $ipAddress = $this->get('ip_address'); > protected $mobileNetworkCode; $this->ipAddress = $ipAddress; > $this->network = Util::cidr($ipAddress, $this->get('prefix_len')); > /** } > * @var string|null } > */
> > /** > * @var string > */
> > /** > * @var string > */
> $this->mobileCountryCode = $this->get('mobile_country_code'); > $this->mobileNetworkCode = $this->get('mobile_network_code');