You are here

public function Country::__construct in Smart IP 7.2

Same name and namespace in other branches
  1. 6.2 includes/vendor/geoip2/geoip2/src/Model/Country.php \GeoIp2\Model\Country::__construct()

@ignore

Overrides AbstractModel::__construct

1 call to Country::__construct()
City::__construct in includes/vendor/geoip2/geoip2/src/Model/City.php
@ignore
1 method overrides Country::__construct()
City::__construct in includes/vendor/geoip2/geoip2/src/Model/City.php
@ignore

File

includes/vendor/geoip2/geoip2/src/Model/Country.php, line 48

Class

Country
Model class for the data returned by GeoIP2 Country web service and database.

Namespace

GeoIp2\Model

Code

public function __construct($raw, $locales = array(
  'en',
)) {
  parent::__construct($raw);
  $this->continent = new \GeoIp2\Record\Continent($this
    ->get('continent'), $locales);
  $this->country = new \GeoIp2\Record\Country($this
    ->get('country'), $locales);
  $this->maxmind = new \GeoIp2\Record\MaxMind($this
    ->get('maxmind'));
  $this->registeredCountry = new \GeoIp2\Record\Country($this
    ->get('registered_country'), $locales);
  $this->representedCountry = new \GeoIp2\Record\RepresentedCountry($this
    ->get('represented_country'), $locales);
  $this->traits = new \GeoIp2\Record\Traits($this
    ->get('traits'));
  $this->locales = $locales;
}