public function getTemperature($withUnit = false)
    {
        if (!$this->lastResponse || !isset($this->lastResponse['item']['condition']['temp'])) {
            return '';
        }
        $return = $this->lastResponse['item']['condition']['temp'];
        if ($withUnit) {
            $return .= ' '.$this->lastResponse['units']['temperature'];
        }

        return $return;
    }
public function getTemperature($withUnit = false)
    {
        if (!$this->lastResponse || !isset($this->lastResponse['item']['condition']['temp'])) {
            return '';
        }
        $return = $this->lastResponse['item']['condition']['temp'];
        if ($withUnit) {
            $return .= ' '.$this->lastResponse['units']['temperature'];
        }

        return $return;
    }
public function getTemperature ( $ withUnit = false ) { if ( ! $ this -> lastResponse || ! isset ( $ this -> lastResponse [ 'item' ] [ 'condition' ] [ 'temp' ] ) ) { return '' ; } $ return = $ this -> lastResponse [ 'item' ] [ 'condition' ] [ 'temp' ] ; if ( $ withUnit ) { $ return .= ' ' . $ this -> lastResponse [ 'units' ] [ 'temperature' ] ; } return $ return ; }
Get current temperature.

@param bool $withUnit return or not the unit

@return string
Get current temperature .