IP2Location.php
private function readWeatherStationNameAndCode($pointer) {
    if (false === $pointer) {
      // Deal with invalid IPs
      $weatherStationName = self::INVALID_IP_ADDRESS;
      $weatherStationCode = self::INVALID_IP_ADDRESS;
    } elseif (0 === self::$columns[self::WEATHER_STATION_NAME][$this->type]) {
      // If the field is not suported, return accordingly
      $weatherStationName = self::FIELD_NOT_SUPPORTED;
      $weatherStationCode = self::FIELD_NOT_SUPPORTED;
    } else {
      // Read weather station name and code
      $weatherStationName = $this->readString($pointer + self::$columns[self::WEATHER_STATION_NAME][$this->type]);
      $weatherStationCode = $this->readString($pointer + self::$columns[self::WEATHER_STATION_CODE][$this->type]);
    }
    return [$weatherStationName, $weatherStationCode];
  }
private function readWeatherStationNameAndCode($pointer) {
    if (false === $pointer) {
      // Deal with invalid IPs
      $weatherStationName = self::INVALID_IP_ADDRESS;
      $weatherStationCode = self::INVALID_IP_ADDRESS;
    } elseif (0 === self::$columns[self::WEATHER_STATION_NAME][$this->type]) {
      // If the field is not suported, return accordingly
      $weatherStationName = self::FIELD_NOT_SUPPORTED;
      $weatherStationCode = self::FIELD_NOT_SUPPORTED;
    } else {
      // Read weather station name and code
      $weatherStationName = $this->readString($pointer + self::$columns[self::WEATHER_STATION_NAME][$this->type]);
      $weatherStationCode = $this->readString($pointer + self::$columns[self::WEATHER_STATION_CODE][$this->type]);
    }
    return [$weatherStationName, $weatherStationCode];
  }
private function readWeatherStationNameAndCode ( $ pointer ) { if ( false === $ pointer ) { // Deal with invalid IPs $ weatherStationName = self :: INVALID_IP_ADDRESS ; $ weatherStationCode = self :: INVALID_IP_ADDRESS ; } elseif ( 0 === self :: $ columns [ self :: WEATHER_STATION_NAME ] [ $ this -> type ] ) { // If the field is not suported, return accordingly $ weatherStationName = self :: FIELD_NOT_SUPPORTED ; $ weatherStationCode = self :: FIELD_NOT_SUPPORTED ; } else { // Read weather station name and code $ weatherStationName = $ this -> readString ( $ pointer + self :: $ columns [ self :: WEATHER_STATION_NAME ] [ $ this -> type ] ) ; $ weatherStationCode = $ this -> readString ( $ pointer + self :: $ columns [ self :: WEATHER_STATION_CODE ] [ $ this -> type ] ) ; } return [ $ weatherStationName , $ weatherStationCode ] ; }
High level function to fetch the weather station name and code

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