PHP Class OAuth2\HttpClient

Afficher le fichier Open project: vznet/oauth_2.0_client_php

Méthodes publiques

Méthode Description
__construct ( string $url, string $method, string $parameters = null, array $header = [] )
execute ( ) executes the curl request
getHeaders ( ) : array
getResponse ( ) : string
parseStringToArray ( string $string, string $firstDelimiter, string $secondDelimiter ) : array parses a string with two delimiters to an array
setDebug ( boolean $debug )

Method Details

__construct() public méthode

public __construct ( string $url, string $method, string $parameters = null, array $header = [] )
$url string
$method string
$parameters string
$header array any additional header which should be set

execute() public méthode

executes the curl request
public execute ( )

getHeaders() public méthode

public getHeaders ( ) : array
Résultat array

getResponse() public méthode

public getResponse ( ) : string
Résultat string

parseStringToArray() public static méthode

example: param1=value1¶m2=value2 will result with delimiters & and = to array( 'param1' => 'value1', 'param2' => 'value2', )
public static parseStringToArray ( string $string, string $firstDelimiter, string $secondDelimiter ) : array
$string string
$firstDelimiter string
$secondDelimiter string
Résultat array

setDebug() public méthode

public setDebug ( boolean $debug )
$debug boolean