public function buildUrlString($baseUrl, $resource)
    {
        if (null === $baseUrl || '' == $baseUrl) {
            return null;
        }

        if (null === $resource || '' == $resource) {
            return $baseUrl;
        }

        $baseUrl = $this->removeTrainingSlash($baseUrl);
        if (!substr($resource, 0, 1) == '/') {
            $resource = '/' . $resource;
        }

        return $baseUrl . $resource;
    }
public function buildUrlString($baseUrl, $resource)
    {
        if (null === $baseUrl || '' == $baseUrl) {
            return null;
        }

        if (null === $resource || '' == $resource) {
            return $baseUrl;
        }

        $baseUrl = $this->removeTrainingSlash($baseUrl);
        if (!substr($resource, 0, 1) == '/') {
            $resource = '/' . $resource;
        }

        return $baseUrl . $resource;
    }
public function buildUrlString ( $ baseUrl , $ resource ) { if ( null === $ baseUrl || '' == $ baseUrl ) { return null ; } if ( null === $ resource || '' == $ resource ) { return $ baseUrl ; } $ baseUrl = $ this -> removeTrainingSlash ( $ baseUrl ) ; if ( ! substr ( $ resource , 0 , 1 ) == '/' ) { $ resource = '/' . $ resource ; } return $ baseUrl . $ resource ; }
Returns either the concatenated string or null on wrong params.

@param string $baseUrl
@param string $resource
@return string|null Null on invalid {$baseUrl}
Returns either the concatenated string or null on wrong params .