PHP Class WDS_WP_REST_API\OAuth1\WPSignature

Inheritance: extends League\OAuth1\Client\Signature\HmacSha1Signature, implements League\OAuth1\Client\Signature\SignatureInterface
Mostra file Open project: webdevstudios/wds-wp-rest-api-connect

Protected Methods

Method Description
baseString ( Guzzle\Http\Url $url, string $method = 'POST', array $parameters = [] ) : string Generate a base string for a HMAC-SHA1 signature based on the given a url, method, and any parameters.
queryStringFromData ( array $data, array $queryParams = false, string $prevKey = '' ) : string Creates an array of urlencoded strings out of each array key/value pair Handles multi-demensional arrays recursively.

Method Details

baseString() protected method

Generate a base string for a HMAC-SHA1 signature based on the given a url, method, and any parameters.
protected baseString ( Guzzle\Http\Url $url, string $method = 'POST', array $parameters = [] ) : string
$url Guzzle\Http\Url
$method string
$parameters array
return string

queryStringFromData() protected method

Creates an array of urlencoded strings out of each array key/value pair Handles multi-demensional arrays recursively.
protected queryStringFromData ( array $data, array $queryParams = false, string $prevKey = '' ) : string
$data array Array of parameters to convert.
$queryParams array Array to extend. False by default.
$prevKey string Optional Array key to append
return string urlencoded string version of data