Documentation

AbstractCurl extends AbstractHandler
in package

AbstractYes

HTTP client abstract curl class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
5.2.0

Table of Contents

Properties

$httpVersion  : string
HTTP version
$options  : array<string|int, mixed>
Curl options
$resource  : mixed
Client resource object
$response  : mixed
Curl response
$uri  : string|null
URI string

Methods

__construct()  : mixed
Constructor
curl()  : mixed
Return curl resource (alias to $this->getResource())
disconnect()  : void
Close the handler connection
getErrorMessage()  : string
Get Curl error number
getErrorNumber()  : int
Get Curl error number
getHttpVersion()  : string
Get the URI string
getOption()  : mixed
Get a Curl option
getOptions()  : array<string|int, mixed>
Get Curl options
getResource()  : mixed
Get the resource
getResponse()  : mixed
Get Curl response
getUri()  : string|null
Get the URI string
getUriObject()  : Uri
Get the URI as an object
hasOption()  : bool
Has a Curl option
hasOptions()  : bool
Has Curl options
hasResource()  : bool
Determine whether or not resource is available
hasResponse()  : bool
Has a Curl response
hasUri()  : bool
Determine whether or not there is a URI string
removeOption()  : AbstractCurl
Remove Curl option
reset()  : AbstractHandler
Method to reset the handler
resource()  : mixed
Get the resource (alias method)
send()  : mixed
Method to send the request
setOption()  : AbstractCurl
Set Curl option
setOptions()  : AbstractCurl
Set Curl options
setResponse()  : AbstractCurl
Get Curl response
version()  : array<string|int, mixed>
Return the Curl version

Properties

$options

Curl options

protected array<string|int, mixed> $options = []

$response

Curl response

protected mixed $response = null

Methods

__construct()

Constructor

public abstract __construct([array<string|int, mixed>|null $options = null ]) : mixed

Instantiate the Curl handler object

Parameters
$options : array<string|int, mixed>|null = null
Tags
throws
Exception

curl()

Return curl resource (alias to $this->getResource())

public curl() : mixed

disconnect()

Close the handler connection

public abstract disconnect() : void

getErrorMessage()

Get Curl error number

public getErrorMessage() : string
Return values
string

getErrorNumber()

Get Curl error number

public getErrorNumber() : int
Return values
int

getHttpVersion()

Get the URI string

public getHttpVersion() : string
Return values
string

getOption()

Get a Curl option

public getOption(int $opt) : mixed
Parameters
$opt : int

getOptions()

Get Curl options

public getOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getResponse()

Get Curl response

public getResponse() : mixed

getUri()

Get the URI string

public getUri() : string|null
Return values
string|null

hasOption()

Has a Curl option

public hasOption(int $opt) : bool
Parameters
$opt : int
Return values
bool

hasOptions()

Has Curl options

public hasOptions() : bool
Return values
bool

hasResource()

Determine whether or not resource is available

public hasResource() : bool
Return values
bool

hasResponse()

Has a Curl response

public hasResponse() : bool
Return values
bool

hasUri()

Determine whether or not there is a URI string

public hasUri() : bool
Return values
bool

resource()

Get the resource (alias method)

public resource() : mixed

version()

Return the Curl version

public version() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results