IP2Location.php
private function readLatitudeAndLongitude($pointer) {
    if (false === $pointer) {
      // Deal with invalid IPs
      $latitude  = self::INVALID_IP_ADDRESS;
      $longitude = self::INVALID_IP_ADDRESS;
    } elseif (0 === self::$columns[self::LATITUDE][$this->type]) {
      // If the field is not suported, return accordingly
      $latitude  = self::FIELD_NOT_SUPPORTED;
      $longitude = self::FIELD_NOT_SUPPORTED;
    } else {
      // Read latitude and longitude
      $latitude  = $this->readFloat($pointer + self::$columns[self::LATITUDE][$this->type]);
      $longitude = $this->readFloat($pointer + self::$columns[self::LONGITUDE][$this->type]);
    }
    return [$latitude, $longitude];
  }
private function readLatitudeAndLongitude($pointer) {
    if (false === $pointer) {
      // Deal with invalid IPs
      $latitude  = self::INVALID_IP_ADDRESS;
      $longitude = self::INVALID_IP_ADDRESS;
    } elseif (0 === self::$columns[self::LATITUDE][$this->type]) {
      // If the field is not suported, return accordingly
      $latitude  = self::FIELD_NOT_SUPPORTED;
      $longitude = self::FIELD_NOT_SUPPORTED;
    } else {
      // Read latitude and longitude
      $latitude  = $this->readFloat($pointer + self::$columns[self::LATITUDE][$this->type]);
      $longitude = $this->readFloat($pointer + self::$columns[self::LONGITUDE][$this->type]);
    }
    return [$latitude, $longitude];
  }
private function readLatitudeAndLongitude ( $ pointer ) { if ( false === $ pointer ) { // Deal with invalid IPs $ latitude = self :: INVALID_IP_ADDRESS ; $ longitude = self :: INVALID_IP_ADDRESS ; } elseif ( 0 === self :: $ columns [ self :: LATITUDE ] [ $ this -> type ] ) { // If the field is not suported, return accordingly $ latitude = self :: FIELD_NOT_SUPPORTED ; $ longitude = self :: FIELD_NOT_SUPPORTED ; } else { // Read latitude and longitude $ latitude = $ this -> readFloat ( $ pointer + self :: $ columns [ self :: LATITUDE ] [ $ this -> type ] ) ; $ longitude = $ this -> readFloat ( $ pointer + self :: $ columns [ self :: LONGITUDE ] [ $ this -> type ] ) ; } return [ $ latitude , $ longitude ] ; }
High level function to fetch the latitude and longitude

@access private
@param int $pointer  Position to read from, if false, return self::INVALID_IP_ADDRESS
@return array
High level function to fetch the latitude and longitude