src/Provider/Wunderground.php
public function getApiRequestUrl(Event $event)
    {
        $params = $event->getCustomParams();

        // Final parameter should be the country
        $country = $params[count($params) - 1];
        // Remove the final paramater
        unset($params[count($params) - 1]);
        // Merge the remainder of the supplied params and remove disallowed punctuation
        $place = trim(implode("_", preg_replace('/[^\da-z\ ]/i', '', $params)));
        return sprintf("%s/%s/conditions/q/%s/%s.json", $this->apiUrl, $this->appId, $country, $place);
    }
public function getApiRequestUrl(Event $event)
    {
        $params = $event->getCustomParams();

        // Final parameter should be the country
        $country = $params[count($params) - 1];
        // Remove the final paramater
        unset($params[count($params) - 1]);
        // Merge the remainder of the supplied params and remove disallowed punctuation
        $place = trim(implode("_", preg_replace('/[^\da-z\ ]/i', '', $params)));
        return sprintf("%s/%s/conditions/q/%s/%s.json", $this->apiUrl, $this->appId, $country, $place);
    }
public function getApiRequestUrl ( Event $ event ) { $ params = $ event -> getCustomParams ( ) ; // Final parameter should be the country $ country = $ params [ count ( $ params ) - 1 ] ; // Remove the final paramater unset ( $ params [ count ( $ params ) - 1 ] ) ; // Merge the remainder of the supplied params and remove disallowed punctuation $ place = trim ( implode ( "_" , preg_replace ( '/[^\da-z\ ]/i' , '' , $ params ) ) ) ; return sprintf ( "%s/%s/conditions/q/%s/%s.json" , $ this -> apiUrl , $ this -> appId , $ country , $ place ) ; }
Return the url for the API request

@param \Phergie\Irc\Plugin\React\Command\CommandEvent $event
@return string
Return the url for the API request