\OctopushCurl

The curl object for Octopush request API

Summary

Methods
Properties
Constants
__construct()
initCurl()
exec()
infos()
setOptions()
__destruct()
No public properties found
No constants found
No protected methods found
$handle
N/A
No private methods found
No private properties found
N/A

Properties

$handle

$handle : resource

The handle resource

Type

resource — curl

Methods

__construct()

__construct() 

Init a new curl object

initCurl()

initCurl() : void

Check if curl is activate

Throws

\Octopush\Exceptions\CurlRequiredException

exec()

exec() : string

Execute the curl request

Throws

\Octopush\Exceptions\CurlResponseException
\Octopush\Exceptions\CurlResponseCodeException

Returns

string —

xml response

infos()

infos() : integer

Get curl infos

Returns

integer

setOptions()

setOptions(string  $url, string  $query, integer  $port) : void

Sets the Curl options

Parameters

string $url

The request url

string $query

The query string builded

integer $port

The port must be 80 or 443

__destruct()

__destruct() : void

Close curl connexion