\Teknoo\CurlRequestGenerator

Class RequestGenerator A service class for generating Curl\Request objects with an initial set of CURLOPT_* options set.

Summary

Methods
Properties
Constants
__construct()
setRequest()
getRequest()
getOptions()
setOptions()
No public properties found
No constants found
No protected methods found
$request
$options
$startArgs
N/A
No private methods found
No private properties found
N/A

Properties

$startArgs

$startArgs : null|string

Type

null|string

Methods

__construct()

__construct(\Teknoo\Curl\OptionsInterface  $options = null, string  $args = '') 

Parameters

\Teknoo\Curl\OptionsInterface $options
string $args

setRequest()

setRequest(\Teknoo\Curl\RequestInterface  $request) : $this

To define the original request to use as "model" in the service. It will be cloned at each call of getRequest().

Parameters

\Teknoo\Curl\RequestInterface $request

Returns

$this

getRequest()

getRequest() : \Teknoo\Curl\Request

Generate a Request object with preset options.

Returns

\Teknoo\Curl\Request

a cURL Request object

getOptions()

getOptions() : \Teknoo\Curl\Options

Return the options manager user here.

Returns

\Teknoo\Curl\Options

setOptions()

setOptions(\Teknoo\Curl\OptionsInterface  $options) : $this

To change the options manager to use in this service.

Parameters

\Teknoo\Curl\OptionsInterface $options

Returns

$this