PHP Class Phalcon\Http\Client\Provider\Curl

Inheritance: extends Phalcon\Http\Client\Request
Exibir arquivo Open project: phalcon/incubator Class Usage Examples

Public Methods

Method Description
__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 )

Protected Methods

Method Description
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.

Private Methods

Method Description
initOptions ( )

Method Details

__clone() public method

public __clone ( )

__construct() public method

public __construct ( )

__destruct() public method

public __destruct ( )

delete() public method

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

get() public method

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

head() public method

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

headerFunction() public method

public headerFunction ( $ch, $headerLine )

initPostFields() protected method

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.
return void

isAvailable() public static method

public static isAvailable ( )

patch() public method

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

post() public method

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

put() public method

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

send() protected method

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).
return Phalcon\Http\Client\Response

setAuth() public method

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

setConnectTimeout() public method

public setConnectTimeout ( $timeout )

setCookies() public method

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

setOption() public method

public setOption ( $option, $value )

setOptions() public method

public setOptions ( $options )

setProxy() public method

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

setTimeout() public method

public setTimeout ( $timeout )