PHP Класс Phalcon\Http\Client\Provider\Curl

Наследование: extends Phalcon\Http\Client\Request
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__clone ( )
__construct ( )
__destruct ( )
delete ( $uri, $params = [], $customHeader = [], $fullResponse = false )
get ( $uri, $params = [], $customHeader = [], $fullResponse = false )
head ( $uri, $params = [], $customHeader = [], $fullResponse = false )
headerFunction ( $ch, $headerLine )
isAvailable ( )
patch ( $uri, $params = [], $useEncoding = true, $customHeader = [], $fullResponse = false )
post ( $uri, $params = [], $useEncoding = true, $customHeader = [], $fullResponse = false )
put ( $uri, $params = [], $useEncoding = true, $customHeader = [], $fullResponse = false )
setAuth ( string $user, string $pass, string $auth = 'basic' ) Setup authentication
setConnectTimeout ( $timeout )
setCookies ( array $cookies ) Set cookies for this session
setOption ( $option, $value )
setOptions ( $options )
setProxy ( $host, $port = 8080, $user = null, $pass = null )
setTimeout ( $timeout )

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

Метод Описание
initPostFields ( mixed $params, boolean $useEncoding = true ) : void Prepare data for a cURL post.
send ( array $customHeader = [], boolean $fullResponse = false ) : Response Sends the request and returns the response.

Приватные методы

Метод Описание
initOptions ( )

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

__clone() публичный метод

public __clone ( )

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

public __construct ( )

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

public __destruct ( )

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

public delete ( $uri, $params = [], $customHeader = [], $fullResponse = false )

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

public get ( $uri, $params = [], $customHeader = [], $fullResponse = false )

head() публичный метод

public head ( $uri, $params = [], $customHeader = [], $fullResponse = false )

headerFunction() публичный метод

public headerFunction ( $ch, $headerLine )

initPostFields() защищенный метод

Prepare data for a cURL post.
protected initPostFields ( mixed $params, boolean $useEncoding = true ) : void
$params mixed Data to send.
$useEncoding boolean Whether to url-encode params. Defaults to true.
Результат void

isAvailable() публичный статический метод

public static isAvailable ( )

patch() публичный метод

public patch ( $uri, $params = [], $useEncoding = true, $customHeader = [], $fullResponse = false )

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

public post ( $uri, $params = [], $useEncoding = true, $customHeader = [], $fullResponse = false )

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

public put ( $uri, $params = [], $useEncoding = true, $customHeader = [], $fullResponse = false )

send() защищенный метод

using custom headers: $customHeader = array( 0 => 'Accept: text/plain', 1 => 'X-Foo: bar', 2 => 'X-Bar: baz', ); $response = $this->send($customHeader);
protected send ( array $customHeader = [], boolean $fullResponse = false ) : Response
$customHeader array An array of values. If not empty then previously added headers gets ignored.
$fullResponse boolean If true returns the full response (including headers).
Результат Phalcon\Http\Client\Response

setAuth() публичный метод

Setup authentication
public setAuth ( string $user, string $pass, string $auth = 'basic' )
$user string
$pass string
$auth string

setConnectTimeout() публичный метод

public setConnectTimeout ( $timeout )

setCookies() публичный метод

Set cookies for this session
public setCookies ( array $cookies )
$cookies array

setOption() публичный метод

public setOption ( $option, $value )

setOptions() публичный метод

public setOptions ( $options )

setProxy() публичный метод

public setProxy ( $host, $port = 8080, $user = null, $pass = null )

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

public setTimeout ( $timeout )