private function Database::readElevation in Smart IP 7.2
Same name and namespace in other branches
- 6.2 includes/vendor/ip2location/ip2location-php/IP2Location.php \IP2Location\Database::readElevation()
High level function to fetch the elevation
@access private
Parameters
int $pointer Position to read from, if false, return self::INVALID_IP_ADDRESS:
Return value
string
1 call to Database::readElevation()
- Database::lookup in includes/
vendor/ ip2location/ ip2location-php/ IP2Location.php - This function will look the given IP address up in the database and return the result(s) asked for
File
- includes/
vendor/ ip2location/ ip2location-php/ IP2Location.php, line 1405
Class
- Database
- IP2Location database class
Namespace
IP2LocationCode
private function readElevation($pointer) {
if (false === $pointer) {
// Deal with invalid IPs
$elevation = self::INVALID_IP_ADDRESS;
}
elseif (0 === self::$columns[self::ELEVATION][$this->type]) {
// If the field is not suported, return accordingly
$elevation = self::FIELD_NOT_SUPPORTED;
}
else {
// Read the elevation
$elevation = $this
->readString($pointer + self::$columns[self::ELEVATION][$this->type]);
}
return $elevation;
}