Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are 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 * > */
* @param mixed $raw
> */ > /** public function __construct($raw) > * @var string|null { > */ parent::__construct($raw); > protected $mobileCountryCode; $this->autonomousSystemNumber = $this->get('autonomous_system_number'); > $this->autonomousSystemOrganization = > /** $this->get('autonomous_system_organization'); > * @var string|null $this->isp = $this->get('isp'); > */ $this->organization = $this->get('organization'); > protected $mobileNetworkCode; > $ipAddress = $this->get('ip_address'); > /** $this->ipAddress = $ipAddress; > * @var string|null $this->network = Util::cidr($ipAddress, $this->get('prefix_len')); > */
}
> } > /** > * @var string > */
> > /** > * @var string > */
< * < * @param mixed $raw
< public function __construct($raw)
> public function __construct(array $raw)
> $this->mobileCountryCode = $this->get('mobile_country_code'); > $this->mobileNetworkCode = $this->get('mobile_network_code');