PHP Class Cloudinary\Curl

ファイルを表示 Open project: cloudinary/cloudinary_php Class Usage Examples

Public Properties

Property Type Description
$apiResponse
$instance the instance used in the tests. Either the original Curl object or a stubbed version
$parameters collects all the parameters of the curl request
$result keeps the result of curl_exec
$url

Public Methods

Method Description
__construct ( )
exec ( $ch )
fields ( ) : array Returns the POST fields that were meant to be sent to the server
getinfo ( $ch, $opt ) When stubbing exec() this function must be stubbed too to return code
getopt ( $option ) : mixed Returns the option that was set in the curl object
globalSetopt ( $ch, $option, $value )
http_method ( )
init ( $url = null )
mockApi ( $test )
mockUpload ( $test )
setopt ( $ch, $option, $value )
url_path ( )

Method Details

__construct() public method

public __construct ( )

exec() public method

public exec ( $ch )

fields() public method

Returns the POST fields that were meant to be sent to the server
public fields ( ) : array
return array an array of field name => value

getinfo() public method

When stubbing exec() this function must be stubbed too to return code
public getinfo ( $ch, $opt )

getopt() public method

Returns the option that was set in the curl object
public getopt ( $option ) : mixed
$option the name of the option
return mixed the value of the option

globalSetopt() public method

public globalSetopt ( $ch, $option, $value )

http_method() public method

public http_method ( )

init() public method

public init ( $url = null )

mockApi() public static method

public static mockApi ( $test )

mockUpload() public static method

public static mockUpload ( $test )

setopt() public method

public setopt ( $ch, $option, $value )

url_path() public method

public url_path ( )

Property Details

$apiResponse public_oe property

public $apiResponse

$instance public_oe static_oe property

the instance used in the tests. Either the original Curl object or a stubbed version
public static $instance

$parameters public_oe property

collects all the parameters of the curl request
public $parameters

$result public_oe property

keeps the result of curl_exec
public $result

$url public_oe property

public $url