OXID eShop CE
6.1.5
|
Public Member Functions | |
setUrl ($url) | |
getUrl () | |
setQuery ($query) | |
getQuery () | |
setParameters ($parameters) | |
getParameters () | |
setHost ($host) | |
getHost () | |
setHeader ($header=null) | |
getHeader () | |
setMethod ($method) | |
getMethod () | |
setOption ($name, $value) | |
getOptions () | |
execute () | |
setConnectionCharset ($charset) | |
getConnectionCharset () | |
getStatusCode () | |
Public Attributes | |
const | EXECUTION_TIMEOUT_OPTION = 'CURLOPT_TIMEOUT' |
const | CONNECT_TIMEOUT_OPTION = 'CURLOPT_CONNECTTIMEOUT' |
Protected Member Functions | |
_setResource ($rCurl) | |
_getResource () | |
_setOptions () | |
_execute () | |
_close () | |
_setOpt ($name, $value) | |
_getErrorNumber () | |
_saveStatusCode () | |
_prepareQueryParameters ($params) | |
_htmlDecode ($mParam) | |
Protected Attributes | |
$_rCurl = null | |
$_sUrl = null | |
$_sQuery = null | |
$_sMethod = 'POST' | |
$_aParameters = null | |
$_sConnectionCharset = "UTF-8" | |
$_aHeader = null | |
$_sHost = null | |
$_aOptions = ['CURLOPT_RETURNTRANSFER' => 1] | |
$_sStatusCode = null | |
CURL request handler. Handles CURL calls
|
protected |
Wrapper function to be mocked for testing.
|
protected |
Wrapper function to be mocked for testing.
|
protected |
Check if curl has errors. Set error message if has.
|
protected |
Returns curl resource
|
protected |
Decode (if needed) html entity.
mixed | $mParam | query |
|
protected |
Decodes html entities.
array | $params | Parameters. |
|
protected |
Sets current request HTTP status code.
|
protected |
Wrapper function to be mocked for testing.
string | $name | curl option name to set value to. |
string | $value | curl option value to set. |
|
protected |
Set Curl Options
|
protected |
Sets resource
resource | $rCurl | curl. |
OxidEsales\EshopCommunity\Core\Curl::execute | ( | ) |
Executes curl call and returns response data as associative array.
oxException | on curl errors |
OxidEsales\EshopCommunity\Core\Curl::getConnectionCharset | ( | ) |
Return connection charset
OxidEsales\EshopCommunity\Core\Curl::getHeader | ( | ) |
Forms header from host.
OxidEsales\EshopCommunity\Core\Curl::getHost | ( | ) |
Returns host.
OxidEsales\EshopCommunity\Core\Curl::getMethod | ( | ) |
Return method to send
OxidEsales\EshopCommunity\Core\Curl::getOptions | ( | ) |
Gets all options for a cURL transfer
OxidEsales\EshopCommunity\Core\Curl::getParameters | ( | ) |
Return parameters to be added to call url.
OxidEsales\EshopCommunity\Core\Curl::getQuery | ( | ) |
Builds query like "param1=value1¶m2=values2.."
OxidEsales\EshopCommunity\Core\Curl::getStatusCode | ( | ) |
Return HTTP status code.
OxidEsales\EshopCommunity\Core\Curl::getUrl | ( | ) |
Get url
OxidEsales\EshopCommunity\Core\Curl::setConnectionCharset | ( | $charset | ) |
Set connection charset
string | $charset | charset |
OxidEsales\EshopCommunity\Core\Curl::setHeader | ( | $header = null | ) |
Set header.
array | $header |
OxidEsales\EshopCommunity\Core\Curl::setHost | ( | $host | ) |
Sets host.
string | $host |
OxidEsales\EshopCommunity\Core\Curl::setMethod | ( | $method | ) |
Set method to send (POST/GET)
string | $method | method to send (POST/GET) |
OxidEsales\EshopCommunity\Core\Curl::setOption | ( | $name, | |
$value | |||
) |
Sets an option for a cURL transfer
string | $name | curl option name to set value to. |
string | $value | curl option value to set. |
oxException | on curl errors |
OxidEsales\EshopCommunity\Core\Curl::setParameters | ( | $parameters | ) |
Sets parameters to be added to call url.
array | $parameters | parameters |
OxidEsales\EshopCommunity\Core\Curl::setQuery | ( | $query | ) |
Set query like "param1=value1¶m2=values2.."
string | $query | Request query. |
OxidEsales\EshopCommunity\Core\Curl::setUrl | ( | $url | ) |
Sets url to call
string | $url | URL to call. |
oxException | if url is not valid |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Set CURL method
|
protected |
Query like "param1=value1¶m2=values2.."
|
protected |
|
protected |
const OxidEsales\EshopCommunity\Core\Curl::CONNECT_TIMEOUT_OPTION = 'CURLOPT_CONNECTTIMEOUT' |
Curl option for setting the timeout for connect.
const OxidEsales\EshopCommunity\Core\Curl::EXECUTION_TIMEOUT_OPTION = 'CURLOPT_TIMEOUT' |
Curl option for setting the timeout of whole execution process.