Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
Asset_Attribute_HTTP_Request Class Reference
Inheritance diagram for Asset_Attribute_HTTP_Request:
Asset_Attribute_Serialise Asset_Attribute MySource_Object Asset_Attribute_OAuth

Public Member Functions

 __construct ($attribute=0, $value=NULL)
 
 paint ($prefix, $read_only=FALSE)
 
 process ($prefix)
 
 setKeywordReplacements ($replacements)
 
 run ()
 
- Public Member Functions inherited from Asset_Attribute_Serialise
 Asset_Attribute_Serialise ($attributeid=0, $value=null)
 
 validateValue (&$value)
 
 getContent ()
 
- Public Member Functions inherited from Asset_Attribute
 Asset_Attribute ($attributeid=0, $value=NULL, $default_params=Array())
 
loadAttribute ($attributeid=0, $value=NULL, $default_params=Array())
 
 type ()
 
 paint ($prefix, $read_only=FALSE)
 
 paintEditParams ($prefix, $write_access=FALSE)
 
 processEditParams ($prefix)
 
 process ($prefix)
 
 validateValue (&$value)
 
 setValue (&$value)
 
 setEditParams (&$node)
 
 setEditParam ($field, $value)
 
 setParam ($field, $value)
 
 getContent ()
 
 getKeywordValue ($format='')
 
 exportToXML ()
 
 exportContentsToXML ()
 
- Public Member Functions inherited from MySource_Object
 MySource_Object ()
 
 __sleep ()
 
 __wakeup ()
 

Protected Member Functions

 _findDocumentEncoding ($response)
 
 _replaceKeywords (&$text)
 
 _performRequests ()
 
 _canCacheResponses ()
 
 _curlAddUrl ($url, $key)
 
 _curlExec ()
 
 _setCacheExpiry (&$response)
 
 _readCurlHeaders ($ch, $header)
 

Protected Attributes

 $_res = Array()
 
 $_config = Array()
 

Additional Inherited Members

- Data Fields inherited from Asset_Attribute
 $id = 0
 
 $name = ''
 
 $uniq = FALSE
 
 $description = ''
 
 $_params = Array()
 
 $_default_value = NULL
 
 $_edit_params = Array()
 
 $value = NULL
 
 $processed = FALSE
 
 $is_admin = FALSE
 

Detailed Description

Definition at line 31 of file http_request.inc.

Constructor & Destructor Documentation

__construct (   $attribute = 0,
  $value = NULL 
)

Constructor

Parameters
string$assetidthe asset id to be loaded

Definition at line 87 of file http_request.inc.

Member Function Documentation

_canCacheResponses ( )
protected

Determine if the request can be cached or not.

Returns
boolean protected

Definition at line 737 of file http_request.inc.

_curlAddUrl (   $url,
  $key 
)
protected

Adds a URL to be requested.

Returns
void protected

Definition at line 763 of file http_request.inc.

_curlExec ( )
protected

Runs the curl requests.

Returns
void

Definition at line 843 of file http_request.inc.

_findDocumentEncoding (   $response)
protected

Returns the document encoding by detecting from content in the response.

Parameters
arraya response with headers & body protected
Returns
string

Definition at line 631 of file http_request.inc.

_performRequests ( )
protected

Run request and cacheing logic for each URL

Returns
void protected

Definition at line 683 of file http_request.inc.

_readCurlHeaders (   $ch,
  $header 
)
protected

Callback to read CURL headers.

Returns
integer protected

Definition at line 982 of file http_request.inc.

_replaceKeywords ( $text)
protected

Replaces global and custom keywords in $text.

Parameters
string&$textprotected
Returns
void

Definition at line 667 of file http_request.inc.

_setCacheExpiry ( $response)
protected

Calculates the appropriate cache expiry, based on config settings and values in the HTTP response headers.

This is not an exhaustive implementation, but is based on RFC2616 http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9

protected

Returns
void

Definition at line 909 of file http_request.inc.

paint (   $prefix,
  $read_only = FALSE 
)

Print the interface for filling in a value

Parameters
string$prefixprefix for the form elements
boolean$read_onlyare we just printing the value
Returns
void public

Definition at line 103 of file http_request.inc.

process (   $prefix)

Process the interface for filling in a value

Parameters
string$prefixprefix for the form elements
Returns
void public

Definition at line 423 of file http_request.inc.

run ( )

Runs the remote requests.

public

Returns
void

Definition at line 487 of file http_request.inc.

setKeywordReplacements (   $replacements)

Sets keyword replacements to be replaced into URLs, headers, post bodies, auth etc.

Parameters
Array$replacementsKeyword indexed array of replacements, e.g. 'my_key_word' => 'my value'
Returns
void public

Definition at line 474 of file http_request.inc.


The documentation for this class was generated from the following file: