src/Client/Signatures/HmacSha1.php
public function buildBaseString(array $oauthParams)
    {
        $tempArray = array();
        ksort($oauthParams);

        if ($oauthParams['oauth_callback'] === '') {
            unset($oauthParams['oauth_callback']);
        }

        if ($oauthParams['oauth_verifier'] === '') {
            unset($oauthParams['oauth_verifier']);
        }

        array_walk($oauthParams, function($value, $key) use (&$tempArray) {
            $tempArray[] = $key . '=' . rawurlencode($value);
        });

        $parsedUrl = parse_url($this->resourceURL);
        $baseString = $this->httpMethod .'&';
        $baseString .= rawurlencode($parsedUrl['scheme'] . '://' . $parsedUrl['host'] . $parsedUrl['path']);
        $baseString .= (isset($parsedUrl['query'])) ? '&' . rawurlencode($parsedUrl['query']) . '%26' : '&';
        $baseString .= rawurlencode(implode('&', $tempArray));

        array_walk($this->postFields, function($value, $key) use (&$baseString) {
            $baseString .= '%26' . $key . rawurlencode('=' . $value);
        });

        return $baseString;
    }
public function buildBaseString(array $oauthParams)
    {
        $tempArray = array();
        ksort($oauthParams);

        if ($oauthParams['oauth_callback'] === '') {
            unset($oauthParams['oauth_callback']);
        }

        if ($oauthParams['oauth_verifier'] === '') {
            unset($oauthParams['oauth_verifier']);
        }

        array_walk($oauthParams, function($value, $key) use (&$tempArray) {
            $tempArray[] = $key . '=' . rawurlencode($value);
        });

        $parsedUrl = parse_url($this->resourceURL);
        $baseString = $this->httpMethod .'&';
        $baseString .= rawurlencode($parsedUrl['scheme'] . '://' . $parsedUrl['host'] . $parsedUrl['path']);
        $baseString .= (isset($parsedUrl['query'])) ? '&' . rawurlencode($parsedUrl['query']) . '%26' : '&';
        $baseString .= rawurlencode(implode('&', $tempArray));

        array_walk($this->postFields, function($value, $key) use (&$baseString) {
            $baseString .= '%26' . $key . rawurlencode('=' . $value);
        });

        return $baseString;
    }
public function buildBaseString ( array $ oauthParams ) { $ tempArray = array ( ) ; ksort ( $ oauthParams ) ; if ( $ oauthParams [ 'oauth_callback' ] === '' ) { unset ( $ oauthParams [ 'oauth_callback' ] ) ; } if ( $ oauthParams [ 'oauth_verifier' ] === '' ) { unset ( $ oauthParams [ 'oauth_verifier' ] ) ; } array_walk ( $ oauthParams , function ( $ value , $ key ) use ( & $ tempArray ) { $ tempArray [ ] = $ key . '=' . rawurlencode ( $ value ) ; } ) ; $ parsedUrl = parse_url ( $ this -> resourceURL ) ; $ baseString = $ this -> httpMethod . '&' ; $ baseString .= rawurlencode ( $ parsedUrl [ 'scheme' ] . '://' . $ parsedUrl [ 'host' ] . $ parsedUrl [ 'path' ] ) ; $ baseString .= ( isset ( $ parsedUrl [ 'query' ] ) ) ? '&' . rawurlencode ( $ parsedUrl [ 'query' ] ) . '%26' : '&' ; $ baseString .= rawurlencode ( implode ( '&' , $ tempArray ) ) ; array_walk ( $ this -> postFields , function ( $ value , $ key ) use ( & $ baseString ) { $ baseString .= '%26' . $ key . rawurlencode ( '=' . $ value ) ; } ) ; return $ baseString ; }
Build the base string based off the values that are passed in

@param array $oauthParams
@return string
Build the base string based off the values that are passed in