public function getWeather($query, $units = 'imperial', $lang = 'en', $appid = '')
    {
        $answer = $this->getRawWeatherData($query, $units, $lang, $appid, 'xml');
        $xml = $this->parseXML($answer);

        return new CurrentWeather($xml, $units);
    }
public function getWeather($query, $units = 'imperial', $lang = 'en', $appid = '')
    {
        $answer = $this->getRawWeatherData($query, $units, $lang, $appid, 'xml');
        $xml = $this->parseXML($answer);

        return new CurrentWeather($xml, $units);
    }
public function getWeather ( $ query , $ units = 'imperial' , $ lang = 'en' , $ appid = '' ) { $ answer = $ this -> getRawWeatherData ( $ query , $ units , $ lang , $ appid , 'xml' ) ; $ xml = $ this -> parseXML ( $ answer ) ; return new CurrentWeather ( $ xml , $ units ) ; }
Returns the current weather at the place you specified.

@param array|int|string $query The place to get weather information for. For possible values see below.
@param string           $units Can be either 'metric' or 'imperial' (default). This affects almost all units returned.
@param string           $lang  The language to use for descriptions, default is 'en'. For possible values see http://openweathermap.org/current#multi.
@param string           $appid Your app id, default ''. See http://openweathermap.org/appid for more details.

@throws OpenWeatherMap\Exception  If OpenWeatherMap returns an error.
@throws \InvalidArgumentException If an argument error occurs.

@return CurrentWeather The weather object.

There are four ways to specify the place to get weather information for:
- Use the city name: $query must be a string containing the city name.
- Use the city id: $query must be an integer containing the city id.
- Use the coordinates: $query must be an associative array containing the 'lat' and 'lon' values.
- Use the zip code: $query must be a string, prefixed with "zip:"

Zip code may specify country. e.g., "zip:77070" (Houston, TX, US) or "zip:500001,IN" (Hyderabad, India)

@api
Returns the current weather at the place you specified .