API > eden > curl.php
View Source

class Eden_Curl

cURL allows you to connect and communicate to many different types of servers with many different types of protocols. We rely on cURL heavily as the main transport for all API interactions.

Constants

  • PUT: PUT
  • DELETE: DELETE
  • GET: GET
  • POST: POST

Public Methods

public function getDomDocumentResponse()

Send the curl off and returns the results parsed as DOMDocument

Returns DOMDOcument

public function getJsonResponse($assoc = true)

Send the curl off and returns the results parsed as JSON

Returns array

public function getMeta($key = NULL)

Returns the meta of the last call

Returns array

public function getQueryResponse()

Send the curl off and returns the results parsed as url query

Returns array

public function getResponse()

Send the curl off and returns the results

Returns string

public function getSimpleXmlResponse()

Send the curl off and returns the results parsed as SimpleXml

Returns SimpleXmlElement

public function offsetExists($offset)

isset using the ArrayAccess interface

Arguments

  1. number

Returns bool

public function offsetGet($offset)

returns data using the ArrayAccess interface

Arguments

  1. number

Returns bool

public function offsetSet($offset, $value)

Sets data using the ArrayAccess interface

Arguments

  1. number
  2. mixed

Returns void

public function offsetUnset($offset)

unsets using the ArrayAccess interface

Arguments

  1. number

Returns bool

public function send()

Send the curl off

Returns this

public function setCustomGet()

Curl has problems handling custom request types from misconfigured end points or vice versa. When default cURL fails, try a custom GET instead

Returns this

public function setCustomPost()

Curl has problems handling custom request types from misconfigured end points or vice versa. When default cURL fails, try a custom POST instead

Returns this

public function setCustomPut()

Curl has problems handling custom request types from misconfigured end points or vice versa. When default cURL fails, try a custom PUT instead

Returns this

public function setCustomDelete()

Curl has problems handling custom request types from misconfigured end points or vice versa. When default cURL fails, try a custom DELETE instead

Returns this

public function setPostFields($fields)

CURLOPT_POSTFIELDS accepts array and string arguments, this is a special case that __call does not handle

Arguments

  1. string|array

Returns this

public function setHeaders($key, $value = NULL)

Sets request headers

Arguments

  1. array|string

Returns this

public function setUrlParameter($key, $value = NULL)

Sets url parameter

Arguments

  1. array|string

Returns this

public function verifyHost($on = true)

Sets CURLOPT_SSL_VERIFYHOST

Arguments

  1. bool

Returns this

public function verifyPeer($on = true)

Sets CURLOPT_SSL_VERIFYPEER

Arguments

  1. bool

Returns this

class Eden_Curl_Error

cUrl Errors


© 2012 Openovate Labs. All rights reserved.