Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403] [Versions 400 and 403] [Versions 401 and 403]

   1  <?php
   2  
   3  declare(strict_types=1);
   4  
   5  namespace GeoIp2\Record;
   6  
   7  /**
   8   * Contains data for the country record associated with an IP address.
   9   *
  10   * This record is returned by all location services and databases.
  11   *
  12   * @property-read int|null $confidence A value from 0-100 indicating MaxMind's
  13   * confidence that the country is correct. This attribute is only available
  14   * from the Insights service and the GeoIP2 Enterprise database.
  15   * @property-read int|null $geonameId The GeoName ID for the country. This
  16   * attribute is returned by all location services and databases.
  17   * @property-read bool $isInEuropeanUnion This is true if the country is a
  18   * member state of the European Union. This attribute is returned by all
  19   * location services and databases.
  20   * @property-read string|null $isoCode The two-character ISO 3166-1 alpha code
  21   * for the country. See https://en.wikipedia.org/wiki/ISO_3166-1. This
  22   * attribute is returned by all location services and databases.
  23   * @property-read string|null $name The name of the country based on the locales
  24   * list passed to the constructor. This attribute is returned by all location
  25   * services and databases.
  26   * @property-read array|null $names An array map where the keys are locale codes
  27   * and the values are names. This attribute is returned by all location
  28   * services and databases.
  29   */
  30  class Country extends AbstractPlaceRecord
  31  {
  32      /**
  33       * @ignore
  34       *
  35       * @var array<string>
  36       */
  37      protected $validAttributes = [
  38          'confidence',
  39          'geonameId',
  40          'isInEuropeanUnion',
  41          'isoCode',
  42          'names',
  43      ];
  44  }