public function getCurrentWeather($where, $event)
    {
        if (!$found = $this->getLatLongForLocation($where)) {
            $this->addLatLongError($event);
            return;
        }

        try {
            list($lat, $long) = $found;
            $forecast = $this->darksky->getBriefForecast($lat, $long);

            $event->addResponse(
                Response::msg(
                    $event->getRequest()->getSource(),
                    sprintf('[Weather for %s] Currently: %s, %s degrees. For the next hour: %s',
                        $where,
                        $forecast['currentSummary'],
                        $forecast['currentTemp'],
                        $forecast['hourSummary']
                    )
                )
            );
        } catch (\Exception $ex) {
            $this->addErrorMsg($event, "Oops, I'm unable to get the weather for that location...");
            return;
        }
    }
public function getCurrentWeather($where, $event)
    {
        if (!$found = $this->getLatLongForLocation($where)) {
            $this->addLatLongError($event);
            return;
        }

        try {
            list($lat, $long) = $found;
            $forecast = $this->darksky->getBriefForecast($lat, $long);

            $event->addResponse(
                Response::msg(
                    $event->getRequest()->getSource(),
                    sprintf('[Weather for %s] Currently: %s, %s degrees. For the next hour: %s',
                        $where,
                        $forecast['currentSummary'],
                        $forecast['currentTemp'],
                        $forecast['hourSummary']
                    )
                )
            );
        } catch (\Exception $ex) {
            $this->addErrorMsg($event, "Oops, I'm unable to get the weather for that location...");
            return;
        }
    }
public function getCurrentWeather ( $ where , $ event ) { if ( ! $ found = $ this -> getLatLongForLocation ( $ where ) ) { $ this -> addLatLongError ( $ event ) ; return ; } try { list ( $ lat , $ long ) = $ found ; $ forecast = $ this -> darksky -> getBriefForecast ( $ lat , $ long ) ; $ event -> addResponse ( Response :: msg ( $ event -> getRequest ( ) -> getSource ( ) , sprintf ( '[Weather for %s] Currently: %s, %s degrees. For the next hour: %s' , $ where , $ forecast [ 'currentSummary' ] , $ forecast [ 'currentTemp' ] , $ forecast [ 'hourSummary' ] ) ) ) ; } catch ( \ Exception $ ex ) { $ this -> addErrorMsg ( $ event , "Oops, I'm unable to get the weather for that location..." ) ; return ; } }
Gets the current weather and a simple prediction for the next hour.

@param string $where The location to lookup
@param \Philip\IRC\Event $event The event to handle

@return void
Gets the current weather and a simple prediction for the next hour .