PHP Class Essence\Http\Client\Curl

Inheritance: implements Essence\Http\Client
Show file Open project: benjamminf/craft-embedded-assets

Protected Properties

Property Type Description
$_curl resource CURL handle.
$_defaults array Default cURL options, takes precedence over the user options.

Public Methods

Method Description
__construct ( array $options = [] ) Initializes cURL with the given options.
__destruct ( ) Closes cURL connexion.
get ( $url ) {@inheritDoc}
setUserAgent ( $agent ) {@inheritDoc}

Method Details

__construct() public method

Initializes cURL with the given options.
public __construct ( array $options = [] )
$options array

__destruct() public method

Closes cURL connexion.
public __destruct ( )

get() public method

{@inheritDoc}
public get ( $url )

setUserAgent() public method

{@inheritDoc}
public setUserAgent ( $agent )

Property Details

$_curl protected property

CURL handle.
protected resource $_curl
return resource

$_defaults protected property

Default cURL options, takes precedence over the user options.
protected array $_defaults
return array