Bug fixes
This commit is contained in:
parent
473435e221
commit
00f274c617
|
@ -4,21 +4,20 @@ namespace GeoIP2\Model;
|
||||||
|
|
||||||
class City extends Country
|
class City extends Country
|
||||||
{
|
{
|
||||||
//XXX use properties
|
protected $city;
|
||||||
private $city;
|
protected $location;
|
||||||
private $location;
|
protected $postal;
|
||||||
private $postal;
|
protected $subdivisions = Array();
|
||||||
private $subdivisions = Array();
|
|
||||||
|
|
||||||
public function __construct($raw, $languages)
|
public function __construct($raw, $languages)
|
||||||
{
|
{
|
||||||
|
parent::__construct($raw, $languages);
|
||||||
|
|
||||||
$this->city = new \GeoIP2\Record\City($this->get('city'), $languages);
|
$this->city = new \GeoIP2\Record\City($this->get('city'), $languages);
|
||||||
$this->location = new \GeoIP2\Record\Location($this->get('location'));
|
$this->location = new \GeoIP2\Record\Location($this->get('location'));
|
||||||
$this->postal = new \GeoIP2\Record\Postal($this->get('postal'));
|
$this->postal = new \GeoIP2\Record\Postal($this->get('postal'));
|
||||||
|
|
||||||
$this->createSubdivisions($raw, $languages);
|
$this->createSubdivisions($raw, $languages);
|
||||||
|
|
||||||
parent::__construct($raw, $languages);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function createSubdivisions($raw, $languages) {
|
private function createSubdivisions($raw, $languages) {
|
||||||
|
|
|
@ -4,5 +4,5 @@ namespace GeoIP2\Record;
|
||||||
|
|
||||||
class City extends AbstractPlaceRecord
|
class City extends AbstractPlaceRecord
|
||||||
{
|
{
|
||||||
protected $validAttribute = Array('confidence', 'geonameId', 'names');
|
protected $validAttributes = Array('confidence', 'geonameId', 'names');
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user