custom/plugins/AcrisShopSwitchCS/src/Resources/GeoIp2/vendor/geoip2/geoip2/src/Model/Country.php line 48

Open in your IDE?
  1. <?php
  2. namespace GeoIp2\Model;
  3. /**
  4.  * Model class for the data returned by GeoIP2 Country web service and database.
  5.  *
  6.  * The only difference between the City and Insights model classes is which
  7.  * fields in each record may be populated. See
  8.  * http://dev.maxmind.com/geoip/geoip2/web-services more details.
  9.  *
  10.  * @property-read \GeoIp2\Record\Continent $continent Continent data for the
  11.  * requested IP address.
  12.  *
  13.  * @property-read \GeoIp2\Record\Country $country Country data for the requested
  14.  * IP address. This object represents the country where MaxMind believes the
  15.  * end user is located.
  16.  *
  17.  * @property-read \GeoIp2\Record\MaxMind $maxmind Data related to your MaxMind
  18.  * account.
  19.  *
  20.  * @property-read \GeoIp2\Record\Country $registeredCountry Registered country
  21.  * data for the requested IP address. This record represents the country
  22.  * where the ISP has registered a given IP block and may differ from the
  23.  * user's country.
  24.  *
  25.  * @property-read \GeoIp2\Record\RepresentedCountry $representedCountry
  26.  * Represented country data for the requested IP address. The represented
  27.  * country is used for things like military bases. It is only present when
  28.  * the represented country differs from the country.
  29.  *
  30.  * @property-read \GeoIp2\Record\Traits $traits Data for the traits of the
  31.  * requested IP address.
  32.  */
  33. class Country extends AbstractModel
  34. {
  35.     protected $continent;
  36.     protected $country;
  37.     protected $locales;
  38.     protected $maxmind;
  39.     protected $registeredCountry;
  40.     protected $representedCountry;
  41.     protected $traits;
  42.     /**
  43.      * @ignore
  44.      */
  45.     public function __construct($raw$locales = array('en'))
  46.     {
  47.         parent::__construct($raw);
  48.         $this->continent = new \GeoIp2\Record\Continent(
  49.             $this->get('continent'),
  50.             $locales
  51.         );
  52.         $this->country = new \GeoIp2\Record\Country(
  53.             $this->get('country'),
  54.             $locales
  55.         );
  56.         $this->maxmind = new \GeoIp2\Record\MaxMind($this->get('maxmind'));
  57.         $this->registeredCountry = new \GeoIp2\Record\Country(
  58.             $this->get('registered_country'),
  59.             $locales
  60.         );
  61.         $this->representedCountry = new \GeoIp2\Record\RepresentedCountry(
  62.             $this->get('represented_country'),
  63.             $locales
  64.         );
  65.         $this->traits = new \GeoIp2\Record\Traits($this->get('traits'));
  66.         $this->locales $locales;
  67.     }
  68. }