Started filling in Model and Record code
This commit is contained in:
@@ -2,11 +2,18 @@
|
||||
|
||||
namespace GeoIP2\Model;
|
||||
|
||||
class City
|
||||
class City extends Country
|
||||
{
|
||||
//XXX use properties
|
||||
public $city;
|
||||
public $location;
|
||||
public $postal;
|
||||
public $subdivisions;
|
||||
|
||||
public function __construct($raw, $language)
|
||||
{
|
||||
|
||||
parent::__construct($raw, $language);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace GeoIP2\Model;
|
||||
|
||||
class CityISPOrg
|
||||
class CityISPOrg extends City
|
||||
{
|
||||
|
||||
}
|
||||
@@ -4,5 +4,17 @@ namespace GeoIP2\Model;
|
||||
|
||||
class Country
|
||||
{
|
||||
// XXX - use __get__
|
||||
public $continent;
|
||||
public $country;
|
||||
public $registered_country;
|
||||
public $represented_country;
|
||||
public $traits;
|
||||
public $raw;
|
||||
|
||||
}
|
||||
public function __construct($raw, $language) {
|
||||
$this->country = new \GeoIP2\Record\Country($raw['country']);
|
||||
|
||||
$this->raw = $raw;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
|
||||
namespace GeoIP2\Model;
|
||||
|
||||
class Omni
|
||||
class Omni extends CityISPOrg
|
||||
{
|
||||
|
||||
}
|
||||
public function __construct($raw, $language) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user