Curl

Tool for a support of cURL library.

package

Default

Methods

Initialize the tool.

__construct() 
Throws
\Dotpay\Exception\ExtensionNotFoundException

Thrown when the cURL library is not installed as a PHP extension

Uninitialize the tool.

__destruct() 

Add a new cURL option to the configuration of the current cURL instance.

addOption(integer $option, mixed $value) : \Dotpay\Tool\Curl

Arguments

$option

integer

A cURL option constant

$value

mixed

A value which is set

Response

\Dotpay\Tool\Curl

Check if the cURL extension for PHP is installed.

checkExtension() : boolean
codeCoverageIgnore

Response

boolean

Close the cURL session.

close() : \Dotpay\Tool\Curl

Return a string containing the last error for the current session.

error() : string

Response

string

Perform a cURL session and returns a result.

exec() : mixed

Response

mixed

Return informations about the last operation.

getInfo() : mixed

Response

mixed

Reset the cURL instance.

reset() : \Dotpay\Tool\Curl

Properties

A cURL resource object

curl : resource
var

A cURL resource object

Type(s)

resource

informations returned by cURL after execution a command

info : mixed
var

informations returned by cURL after execution a command

Type(s)

mixed

A flag which inform if the curl object is active

active : boolean
var

A flag which inform if the curl object is active

Type(s)

boolean