src/Oauth.php
protected function prepareHeaders($method, $url, array $params, array $overrides = [])
    {
        $oauth = array_merge([
            'oauth_consumer_key'     => $this->consumerKey,
            'oauth_nonce'            => md5(uniqid(rand(), true)),
            'oauth_signature_method' => 'HMAC-SHA1',
            'oauth_timestamp'        => time(),
            'oauth_version'          => '1.0A',
            'oauth_token'            => $this->oauthToken,
        ], $overrides);

        foreach ($oauth as $k => $v) {
            $oauth[$k] = rawurlencode($v);
        }

        foreach ($params as $k => $v) {
            $params[$k] = rawurlencode($v);
        }

        $sigParams = array_merge($oauth, $params);
        ksort($sigParams);

        $oauth['oauth_signature'] = rawurlencode($this->generateSignature($method, $url, $sigParams));

        return $oauth;
    }
protected function prepareHeaders($method, $url, array $params, array $overrides = [])
    {
        $oauth = array_merge([
            'oauth_consumer_key'     => $this->consumerKey,
            'oauth_nonce'            => md5(uniqid(rand(), true)),
            'oauth_signature_method' => 'HMAC-SHA1',
            'oauth_timestamp'        => time(),
            'oauth_version'          => '1.0A',
            'oauth_token'            => $this->oauthToken,
        ], $overrides);

        foreach ($oauth as $k => $v) {
            $oauth[$k] = rawurlencode($v);
        }

        foreach ($params as $k => $v) {
            $params[$k] = rawurlencode($v);
        }

        $sigParams = array_merge($oauth, $params);
        ksort($sigParams);

        $oauth['oauth_signature'] = rawurlencode($this->generateSignature($method, $url, $sigParams));

        return $oauth;
    }
protected function prepareHeaders ( $ method , $ url , array $ params , array $ overrides = [ ] ) { $ oauth = array_merge ( [ 'oauth_consumer_key' => $ this -> consumerKey , 'oauth_nonce' => md5 ( uniqid ( rand ( ) , true ) ) , 'oauth_signature_method' => 'HMAC-SHA1' , 'oauth_timestamp' => time ( ) , 'oauth_version' => '1.0A' , 'oauth_token' => $ this -> oauthToken , ] , $ overrides ) ; foreach ( $ oauth as $ k => $ v ) { $ oauth [ $ k ] = rawurlencode ( $ v ) ; } foreach ( $ params as $ k => $ v ) { $ params [ $ k ] = rawurlencode ( $ v ) ; } $ sigParams = array_merge ( $ oauth , $ params ) ; ksort ( $ sigParams ) ; $ oauth [ 'oauth_signature' ] = rawurlencode ( $ this -> generateSignature ( $ method , $ url , $ sigParams ) ) ; return $ oauth ; }
Prepares oauth headers for a given request.

@param string $method
@param string $url
@param array  $params

@return array
Prepares oauth headers for a given request .