phalconplus Documentation v1.3.0-development
Source
Class PhalconPlus Curl

# Curl

Methods

- __construct(array $opts) : void
- getAllowedMethods() : array
  Get allowed methods.
- setDefaultHeaders(array $headers) : PhalconPlus\Curl\Curl
  Set the default headers for every request.
- getDefaultHeaders() : array
  Get the default headers.
- setDefaultOptions(array $options) : PhalconPlus\Curl\Curl
  Set the default curl options for every request.
- getDefaultOptions() : void
  Get the default options.
- setBaseUrl(string $baseUrl) : PhalconPlus\Curl\Curl
  Get the default options.
- buildUrl(string $url, array $query) : string
  Build an URL with an optional query string.
- newRequest(string $method, string $url, variable $data, int $encoding) : \PhalconPlus\Curl\Request
  Create a new response object and set its values.
- newJsonRequest(string $method, string $url, array $data) : \PhalconPlus\Curl\Request
  Create a new JSON request and set its values.
- newRawRequest(string $method, string $url, variable $data) : \PhalconPlus\Curl\Request
  Create a new raw request and set its values.
- prepareRequest(variable $request) : PhalconPlus\Curl\Curl
  Prepare the curl resource for sending a request.
- sendRequest(variable $request) : \PhalconPlus\Curl\Response
  Send a request.
- createResponseObject(variable $response) : \PhalconPlus\Curl\Response
  Extract the response info, header and body from a cURL response. Saves
- __call(string $func, array $args) : \PhalconPlus\Curl\Response
  Handle dynamic calls to the class.
- zephir_init_properties_PhalconPlus_Curl_Curl() : void

Methods Details

- public function __construct(array $opts)

- public function getAllowedMethods()

  Get allowed methods.

- public function setDefaultHeaders(array $headers)

  Set the default headers for every request.

- public function getDefaultHeaders()

  Get the default headers.

- public function setDefaultOptions(array $options)

  Set the default curl options for every request.

- public function getDefaultOptions()

  Get the default options.

- public function setBaseUrl(string $baseUrl)

  Get the default options.

- public function buildUrl(string $url, array $query)

  Build an URL with an optional query string.

- public function newRequest(string $method, string $url, variable $data, int $encoding)

  Create a new response object and set its values.

- public function newJsonRequest(string $method, string $url, array $data)

  Create a new JSON request and set its values.

- public function newRawRequest(string $method, string $url, variable $data)

  Create a new raw request and set its values.

- public function prepareRequest(variable $request)

  Prepare the curl resource for sending a request.

- public function sendRequest(variable $request)

  Send a request.

- protected function createResponseObject(variable $response)

  Extract the response info, header and body from a cURL response. Saves
  the data in variables stored on the object.

- public function __call(string $func, array $args)

  Handle dynamic calls to the class.

- internal function zephir_init_properties_PhalconPlus_Curl_Curl()