Свойство | Тип | Описание | |
---|---|---|---|
$curlOptions | Additinal curl options, which are not stored within a request. | ||
$multiExecLastCh | Last active curl_multi_exec() handle. | ||
$multiHandles | All curl handles which belong to curl_multi handles. | ||
$requestCallback | Callback which will be executed when a request is intercepted. | ||
$requests | All requests which have been intercepted. | ||
$responses | All responses which have been intercepted. | ||
$status | Current status of this hook, either enabled or disabled. |
Метод | Описание | |
---|---|---|
__callStatic ( string $method, array $args ) : mixed | Calls the intercepted curl method if library hook is disabled, otherwise the real one. | |
__construct ( VCR\CodeTransform\AbstractCodeTransform $codeTransformer, |
Creates a new cURL hook instance. | |
curlExec ( resource $curlHandle ) : mixed | Perform a cURL session. | |
curlGetinfo ( resource $curlHandle, integer $option ) : mixed | Get information regarding a specific transfer. | |
curlInit ( string $url = null ) : resource | Initialize a cURL session. | |
curlMultiAddHandle ( resource $multiHandle, resource $curlHandle ) | Add a normal cURL handle to a cURL multi handle. | |
curlMultiExec ( resource $multiHandle, integer &$stillRunning ) : integer | Run the sub-connections of the current cURL handle. | |
curlMultiInfoRead ( ) : array | boolean | Get information about the current transfers. | |
curlMultiRemoveHandle ( resource $multiHandle, resource $curlHandle ) | Remove a multi handle from a set of cURL handles. | |
curlReset ( resource $curlHandle ) | Reset a cURL session. | |
curlSetopt ( resource $curlHandle, integer $option, mixed $value ) : boolean | Set an option for a cURL transfer. | |
curlSetoptArray ( resource $curlHandle, array $options ) | Set multiple options for a cURL transfer. | |
disable ( ) | ||
enable ( Closure $requestCallback ) | ||
isEnabled ( ) |
public __construct ( VCR\CodeTransform\AbstractCodeTransform $codeTransformer, |
||
$codeTransformer | VCR\CodeTransform\AbstractCodeTransform | |
$processor |
public static curlGetinfo ( resource $curlHandle, integer $option ) : mixed | ||
$curlHandle | resource | A cURL handle returned by curl_init(). |
$option | integer | A cURL option defined in the cURL Predefined Constants. |
Результат | mixed |
public static curlMultiAddHandle ( resource $multiHandle, resource $curlHandle ) | ||
$multiHandle | resource | A cURL multi handle returned by curl_multi_init(). |
$curlHandle | resource | A cURL handle returned by curl_init(). |
public static curlMultiExec ( resource $multiHandle, integer &$stillRunning ) : integer | ||
$multiHandle | resource | A cURL multi handle returned by curl_multi_init(). |
$stillRunning | integer | A reference to a flag to tell whether the operations are still running. |
Результат | integer | A cURL code defined in the cURL Predefined Constants. |
public static curlMultiInfoRead ( ) : array | boolean | ||
Результат | array | boolean | On success, returns an associative array for the message, FALSE on failure. |
public static curlMultiRemoveHandle ( resource $multiHandle, resource $curlHandle ) | ||
$multiHandle | resource | A cURL multi handle returned by curl_multi_init(). |
$curlHandle | resource | A cURL handle returned by curl_init(). |
public static curlReset ( resource $curlHandle ) | ||
$curlHandle | resource | A cURL handle returned by curl_init(). |
public static curlSetopt ( resource $curlHandle, integer $option, mixed $value ) : boolean | ||
$curlHandle | resource | A cURL handle returned by curl_init(). |
$option | integer | The CURLOPT_XXX option to set. |
$value | mixed | The value to be set on option. |
Результат | boolean | Returns TRUE on success or FALSE on failure. |
public static curlSetoptArray ( resource $curlHandle, array $options ) | ||
$curlHandle | resource | A cURL handle returned by curl_init(). |
$options | array | An array specifying which options to set and their values. |
protected static $curlOptions |
protected static $multiExecLastCh |
protected static $multiHandles |
protected static $requestCallback |
protected static $requests |
protected static $responses |