__construct()
close()
connect()
getConfig()
getHandle()
read()
readHeader()
setCurlOption()
setOptions()
setOutputStream()
write()
$config
$connectedTo
$curl
$invalidOverwritableCurlOptions
$outputStream
$response
An adapter class for Zend\Http\Client based on the curl extension.
Curl requires libcurl. See for full requirements the PHP manual: http://php.net/curl
__construct()
Config is set using setOptions()
\Zend\Http\Client\Adapter\Exception\InitializationException |
---|
close()
connect(string $host, int $port, bool $secure) : void
string
int
bool
\Zend\Http\Client\Adapter\Exception\RuntimeException |
if unable to connect |
---|
getConfig() : array
array
getHandle() : resource
resource
read() : string
string
readHeader(resource $curl, string $header) : int
resource
string
int
setCurlOption(string | int $option, mixed $value) : \Zend\Http\Client\Adapter\Curl
setOptions(array | \Traversable $options) : \Zend\Http\Client\Adapter\Curl
array\Traversable
\Zend\Http\Client\Adapter\Exception\InvalidArgumentException |
---|
setOutputStream(resource $stream) : \Zend\Http\Client\Adapter\Curl
This function sets output stream where the result will be stored.
resource
write(string $method, \Zend\Uri\Uri $uri, float $httpVersion, array $headers, string $body) : string
string
\Zend\Uri\Uri
float
array
string
\Zend\Http\Client\Adapter\Exception\RuntimeException |
If connection fails, connected to wrong host, no PUT file defined, unsupported method, or unsupported cURL option |
---|---|
\Zend\Http\Client\Adapter\Exception\InvalidArgumentException |
if $method is currently not supported |
string
$request$config : array
$connectedTo : array
$curl : resource | null
$invalidOverwritableCurlOptions : array
$outputStream : resource
$response : string