PHP 클래스 TTools\OAuthRequest

파일 보기 프로젝트 열기: ttools/ttools

보호된 프로퍼티들

프로퍼티 타입 설명
$boundary string
$consumerKey Application consumer key
$consumerSecret Application consumer secret
$headers array
$requestBody string
$token Request Token
$tokenSecret Request Secret
$userAgent Curl User Agent

공개 메소드들

메소드 설명
__construct ( string $consumerKey, string $consumerSecret, string $token, string $tokenSecret ) Creates the OAuthRequest object
addHeader ( string $header )
buildHeaders ( $method, $url, $params = [], $multipart = false )
getConsumerKey ( ) : string
getConsumerSecret ( ) : string
getHeaders ( ) : mixed
getRequestBody ( ) : mixed
getToken ( ) : string
getTokenSecret ( ) : string
getUserAgent ( ) : string
request ( string $method, string $url, array $params = [], boolean $multipart = false ) : OAuthResponse Performs an authenticated OAuth Request
setConsumerKey ( string $consumerKey )
setConsumerSecret ( string $consumerSecret )
setHeaders ( mixed $headers )
setRequestBody ( mixed $requestBody )
setToken ( string $token )
setTokenSecret ( string $tokenSecret )
setUserAgent ( string $userAgent )

보호된 메소드들

메소드 설명
buildMultipartContent ( $file )
curlRequest ( string $url, array $params = [], string $method = 'GET', boolean $multipart = false ) : OAuthResponse Performs a OAuth curl request.
encodeParams ( array $params = [], boolean $quoted = false ) : array Encodes parameters
formatQueryString ( array $params ) : string
getOAuthHeader ( string $method, string $url, array $params = [], boolean $multipart = false ) : string Gets the OAuth signed Authorization headers
urlencodeRfc3986 ( $input ) : array | mixed | string

메소드 상세

__construct() 공개 메소드

Creates the OAuthRequest object
public __construct ( string $consumerKey, string $consumerSecret, string $token, string $tokenSecret )
$consumerKey string Application Consumer Key
$consumerSecret string Application Consumer Secret
$token string Request Token
$tokenSecret string Request Token Secret

addHeader() 공개 메소드

public addHeader ( string $header )
$header string

buildHeaders() 공개 메소드

public buildHeaders ( $method, $url, $params = [], $multipart = false )

buildMultipartContent() 보호된 메소드

protected buildMultipartContent ( $file )

curlRequest() 보호된 메소드

Performs a OAuth curl request.
protected curlRequest ( string $url, array $params = [], string $method = 'GET', boolean $multipart = false ) : OAuthResponse
$url string
$params array
$method string
$multipart boolean
리턴 OAuthResponse

encodeParams() 보호된 메소드

Encodes parameters
protected encodeParams ( array $params = [], boolean $quoted = false ) : array
$params array
$quoted boolean
리턴 array

formatQueryString() 보호된 메소드

protected formatQueryString ( array $params ) : string
$params array
리턴 string

getConsumerKey() 공개 메소드

public getConsumerKey ( ) : string
리턴 string

getConsumerSecret() 공개 메소드

public getConsumerSecret ( ) : string
리턴 string

getHeaders() 공개 메소드

public getHeaders ( ) : mixed
리턴 mixed

getOAuthHeader() 보호된 메소드

Gets the OAuth signed Authorization headers
protected getOAuthHeader ( string $method, string $url, array $params = [], boolean $multipart = false ) : string
$method string
$url string
$params array
$multipart boolean
리턴 string

getRequestBody() 공개 메소드

public getRequestBody ( ) : mixed
리턴 mixed

getToken() 공개 메소드

public getToken ( ) : string
리턴 string

getTokenSecret() 공개 메소드

public getTokenSecret ( ) : string
리턴 string

getUserAgent() 공개 메소드

public getUserAgent ( ) : string
리턴 string

request() 공개 메소드

Performs an authenticated OAuth Request
public request ( string $method, string $url, array $params = [], boolean $multipart = false ) : OAuthResponse
$method string Request Method (GET / POST)
$url string Request endpoint (e.g: /1.1/account/verify_credentials.json)
$params array Params for the request
$multipart boolean If the request is multipart or not (defaults to false)
리턴 OAuthResponse Returns an OAuthResponse object

setConsumerKey() 공개 메소드

public setConsumerKey ( string $consumerKey )
$consumerKey string

setConsumerSecret() 공개 메소드

public setConsumerSecret ( string $consumerSecret )
$consumerSecret string

setHeaders() 공개 메소드

public setHeaders ( mixed $headers )
$headers mixed

setRequestBody() 공개 메소드

public setRequestBody ( mixed $requestBody )
$requestBody mixed

setToken() 공개 메소드

public setToken ( string $token )
$token string

setTokenSecret() 공개 메소드

public setTokenSecret ( string $tokenSecret )
$tokenSecret string

setUserAgent() 공개 메소드

public setUserAgent ( string $userAgent )
$userAgent string

urlencodeRfc3986() 보호된 메소드

protected urlencodeRfc3986 ( $input ) : array | mixed | string
$input
리턴 array | mixed | string

프로퍼티 상세

$boundary 보호되어 있는 프로퍼티

protected string $boundary
리턴 string

$consumerKey 보호되어 있는 프로퍼티

Application consumer key
protected $consumerKey

$consumerSecret 보호되어 있는 프로퍼티

Application consumer secret
protected $consumerSecret

$headers 보호되어 있는 프로퍼티

protected array $headers
리턴 array

$requestBody 보호되어 있는 프로퍼티

protected string $requestBody
리턴 string

$token 보호되어 있는 프로퍼티

Request Token
protected $token

$tokenSecret 보호되어 있는 프로퍼티

Request Secret
protected $tokenSecret

$userAgent 보호되어 있는 프로퍼티

Curl User Agent
protected $userAgent