PHP Class Resources\Rest

Afficher le fichier Open project: panada/panada

Méthodes publiques

Свойство Type Description
$curlSSLVerifypeer
$requestData
$requestHeaders
$requestMethod
$responseOutputHeader
$responseStatus
$setRequestHeaders
$timeout

Méthodes publiques

Méthode Description
__construct ( )
getClientHeaders ( ) : array Get client request headers.
getFiles ( ) : array Get clent file(s) submited by POST or PUT.
getRequest ( ) : array Get clent HTTP Request type.
getRequestData ( ) : array Getter for requestData.
getRequestMethod ( ) : string Getter for requstMethod.
getResponseStatus ( ) : integer Getter for responseStatus.
sendRequest ( string $uri, string $method = 'GET', array | string $data = null ) : booeal Send HTTP Request to server.
setRequestAuthorization ( string $signature, string $type = 'Basic' ) Set HTTP Headers Authorization.
setRequestHeaders ( array $options = [] ) Set additional HTTP Request headers.
setResponseHeader ( $code = 200 ) Set HTTP Response headers code.
wrapResponseOutput ( array $data, string $format = 'json', string $ContentType = 'application' ) : string The return data type.

Private Methods

Méthode Description
getPHPInput ( ) : array See this trick at http://www.php.net/manual/en/function.curl-setopt.php#96056.

Method Details

__construct() public méthode

public __construct ( )

getClientHeaders() public méthode

Get client request headers.
public getClientHeaders ( ) : array
Résultat array

getFiles() public méthode

Get clent file(s) submited by POST or PUT.
public getFiles ( ) : array
Résultat array

getRequest() public méthode

Get clent HTTP Request type.
public getRequest ( ) : array
Résultat array

getRequestData() public méthode

Getter for requestData.
public getRequestData ( ) : array
Résultat array

getRequestMethod() public méthode

Getter for requstMethod.
public getRequestMethod ( ) : string
Résultat string

getResponseStatus() public méthode

Getter for responseStatus.
public getResponseStatus ( ) : integer
Résultat integer

sendRequest() public méthode

Send HTTP Request to server.
public sendRequest ( string $uri, string $method = 'GET', array | string $data = null ) : booeal
$uri string The server's URL
$method string HTTP Request method type
$data array | string
Résultat booeal if false and string if true

setRequestAuthorization() public méthode

Set HTTP Headers Authorization.
public setRequestAuthorization ( string $signature, string $type = 'Basic' )
$signature string Secret string to access the server
$type string The Auth type eg: Basic, OAuth etc

setRequestHeaders() public méthode

Set additional HTTP Request headers.
public setRequestHeaders ( array $options = [] )
$options array

setResponseHeader() public méthode

Set HTTP Response headers code.
public setResponseHeader ( $code = 200 )

wrapResponseOutput() public méthode

The return data type.
public wrapResponseOutput ( array $data, string $format = 'json', string $ContentType = 'application' ) : string
$data array
$format string
$ContentType string
Résultat string

Property Details

$curlSSLVerifypeer public_oe property

public $curlSSLVerifypeer

$requestData public_oe property

public $requestData

$requestHeaders public_oe property

public $requestHeaders

$requestMethod public_oe property

public $requestMethod

$responseOutputHeader public_oe property

public $responseOutputHeader

$responseStatus public_oe property

public $responseStatus

$setRequestHeaders public_oe property

public $setRequestHeaders

$timeout public_oe property

public $timeout