Class Guzzle\Http\Curl\RequestMediator

InheritanceGuzzle\Http\Curl\RequestMediator

Mediator between curl handles and request objects

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$emitIo bool Whether or not to emit read/write events Guzzle\Http\Curl\RequestMediator
$request Guzzle\Http\Message\RequestInterface Guzzle\Http\Curl\RequestMediator

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Guzzle\Http\Curl\RequestMediator
progress() Received a progress notification Guzzle\Http\Curl\RequestMediator
readRequestBody() Read data from the request body and send it to curl Guzzle\Http\Curl\RequestMediator
receiveResponseHeader() Receive a response header from curl Guzzle\Http\Curl\RequestMediator
writeResponseBody() Write data to the response body of a request Guzzle\Http\Curl\RequestMediator

Property Details

$emitIo protected property

Whether or not to emit read/write events

protected bool $emitIo null
$request protected property

Method Details

__construct() public method

public void __construct ( Guzzle\Http\Message\RequestInterface $request, $emitIo false )
$request Guzzle\Http\Message\RequestInterface

Request to mediate

$emitIo bool

Set to true to dispatch events on input and output

progress() public method

Received a progress notification

public void progress ( $downloadSize, $downloaded, $uploadSize, $uploaded, $handle null )
$downloadSize int

Total download size

$downloaded int

Amount of bytes downloaded

$uploadSize int

Total upload size

$uploaded int

Amount of bytes uploaded

$handle resource

CurlHandle object

readRequestBody() public method

Read data from the request body and send it to curl

public string readRequestBody ( $ch, $fd, $length )
$ch resource

Curl handle

$fd resource

File descriptor

$length int

Amount of data to read

receiveResponseHeader() public method

Receive a response header from curl

public int receiveResponseHeader ( $curl, $header )
$curl resource

Curl handle

$header string

Received header

writeResponseBody() public method

Write data to the response body of a request

public int writeResponseBody ( $curl, $write )
$curl resource

Curl handle

$write string

Data that was received