abstract class AbstractPlaceRecord in Smart IP 7.2
Same name and namespace in other branches
- 6.2 includes/vendor/geoip2/geoip2/src/Record/AbstractPlaceRecord.php \GeoIp2\Record\AbstractPlaceRecord
Hierarchy
- class \GeoIp2\Record\AbstractRecord implements \GeoIp2\Compat\JsonSerializable
- class \GeoIp2\Record\AbstractPlaceRecord
Expanded class hierarchy of AbstractPlaceRecord
File
- includes/
vendor/ geoip2/ geoip2/ src/ Record/ AbstractPlaceRecord.php, line 5
Namespace
GeoIp2\RecordView source
abstract class AbstractPlaceRecord extends AbstractRecord {
private $locales;
/**
* @ignore
*/
public function __construct($record, $locales = array(
'en',
)) {
$this->locales = $locales;
parent::__construct($record);
}
/**
* @ignore
*/
public function __get($attr) {
if ($attr == 'name') {
return $this
->name();
}
else {
return parent::__get($attr);
}
}
private function name() {
foreach ($this->locales as $locale) {
if (isset($this->names[$locale])) {
return $this->names[$locale];
}
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AbstractPlaceRecord:: |
private | property | ||
AbstractPlaceRecord:: |
private | function | ||
AbstractPlaceRecord:: |
public | function |
@ignore Overrides AbstractRecord:: |
|
AbstractPlaceRecord:: |
public | function |
@ignore Overrides AbstractRecord:: |
|
AbstractRecord:: |
private | property | ||
AbstractRecord:: |
private | function | ||
AbstractRecord:: |
public | function | ||
AbstractRecord:: |
private | function | ||
AbstractRecord:: |
public | function |