Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 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.

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