PHP Класс Doctrine\OrientDB\Binding\Client\Http\CurlClient

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$authentication
$cookies
$curl
$restart

Открытые методы

Метод Описание
__construct ( boolean $restart = false, integer $timeout = 10 ) Creates a new HTTP client based on cURL.
__destruct ( ) Closes the underlying cURL handle.
delete ( String $location, $body = null ) : CurlClientResponse Executes a DELETE on a resource.
execute ( String $method, String $location ) : CurlClientResponse Executes a Curl.
get ( String $location ) : CurlClientResponse GETs a resource.
post ( String $location, String $body ) : CurlClientResponse Executes a POST on a location.
put ( String $location, String $body ) : CurlClientResponse PUTs a resource.
restart ( ) Reinitializes the client for a completely new session.
setAuthentication ( String $credentials ) Sets the authentication string for the next HTTP requests.
setHeader ( type $header, type $value ) Sets an HTTP header to send within the request.
setTimeout ( integer $timeout ) Sets a timeout for the current cURL handler's requests.

Защищенные методы

Метод Описание
createCurlHandle ( ) : resource Creates and initializes the underlying cURL handle.
getDefaultCurlOptions ( ) : array Returns an array with a set of default options for cURL.
getRequestCookies ( ) : string Returns a string with the list of cookies for the Cookie header.

Описание методов

__construct() публичный Метод

Creates a new HTTP client based on cURL.
public __construct ( boolean $restart = false, integer $timeout = 10 )
$restart boolean
$timeout integer

__destruct() публичный Метод

Closes the underlying cURL handle.
public __destruct ( )

createCurlHandle() защищенный Метод

Creates and initializes the underlying cURL handle.
protected createCurlHandle ( ) : resource
Результат resource

delete() публичный Метод

Executes a DELETE on a resource.
public delete ( String $location, $body = null ) : CurlClientResponse
$location String
Результат CurlClientResponse

execute() публичный Метод

Executes a Curl.
public execute ( String $method, String $location ) : CurlClientResponse
$method String
$location String
Результат CurlClientResponse

get() публичный Метод

GETs a resource.
public get ( String $location ) : CurlClientResponse
$location String
Результат CurlClientResponse

getDefaultCurlOptions() защищенный Метод

Returns an array with a set of default options for cURL.
protected getDefaultCurlOptions ( ) : array
Результат array

getRequestCookies() защищенный Метод

Returns a string with the list of cookies for the Cookie header.
protected getRequestCookies ( ) : string
Результат string

post() публичный Метод

Executes a POST on a location.
public post ( String $location, String $body ) : CurlClientResponse
$location String
$body String
Результат CurlClientResponse

put() публичный Метод

PUTs a resource.
public put ( String $location, String $body ) : CurlClientResponse
$location String
$body String
Результат CurlClientResponse

restart() публичный Метод

Reinitializes the client for a completely new session.
public restart ( )

setAuthentication() публичный Метод

Sets the authentication string for the next HTTP requests.
public setAuthentication ( String $credentials )
$credentials String

setHeader() публичный Метод

Sets an HTTP header to send within the request.
public setHeader ( type $header, type $value )
$header type
$value type

setTimeout() публичный Метод

Sets a timeout for the current cURL handler's requests.
public setTimeout ( integer $timeout )
$timeout integer

Описание свойств

$authentication защищенное свойство

protected $authentication

$cookies защищенное свойство

protected $cookies

$curl защищенное свойство

protected $curl

$restart защищенное свойство

protected $restart