private function getServiceUrl(array $service)
    {
        $map = ['username' => 'user', 'password' => 'pass'];
        $urlParts = [];
        foreach ($service as $key => $value) {
            $newKey = isset($map[$key]) ? $map[$key] : $key;
            $urlParts[$newKey] = $value;
        }

        return Url::buildUrl($urlParts);
    }
private function getServiceUrl(array $service)
    {
        $map = ['username' => 'user', 'password' => 'pass'];
        $urlParts = [];
        foreach ($service as $key => $value) {
            $newKey = isset($map[$key]) ? $map[$key] : $key;
            $urlParts[$newKey] = $value;
        }

        return Url::buildUrl($urlParts);
    }
private function getServiceUrl ( array $ service ) { $ map = [ 'username' => 'user' , 'password' => 'pass' ] ; $ urlParts = [ ] ; foreach ( $ service as $ key => $ value ) { $ newKey = isset ( $ map [ $ key ] ) ? $ map [ $ key ] : $ key ; $ urlParts [ $ newKey ] = $ value ; } return Url :: buildUrl ( $ urlParts ) ; }
Build a URL to a service.

@param array $service

@return string
Build a URL to a service .