Class AtomFeed

Description

Located in /class.atomapi.php (line 307)


	
			
Variable Summary
mixed $auth
mixed $author
mixed $endpoint
mixed $entries
mixed $err_no
mixed $generator
mixed $id
mixed $info
mixed $links
mixed $modified
mixed $tagline
mixed $title
mixed $version
Method Summary
AtomFeed AtomFeed ([String $endpoint = false], [AuthObj $auth = false], [String $xml = false])
void add_entry (AtomEntry $entry)
void add_link (String $href, String $rel, [String $title = ''], String $type)
Int/FALSE error ()
Array/FALSE extract_attribs (String $str)
void from_xml (String $xml)
AuthObj/FALSE get_auth ()
String/FALSE get_endpoint ()
Array/FALSE get_entries ()
Array/String/FALSE get_generator ([String $elem = false])
String get_id ()
Array/String/FALSE get_info ([mixed $elem = false])
Array get_links ([String $key = false], [String $val = false])
String/FALSE get_modified ()
Array/String/FALSE get_tagline ([String $elem = false])
Array/String/FALSE get_title ([String $elem = false])
String get_version ()
TRUE/Int init ()
void set_auth (AuthObj $auth)
void set_endpoint (String $uri)
void set_generator (Array $gen)
void set_id (String $i)
void set_info (Array/String $info)
void set_modified (String $date)
void set_tagline (Array/String $tagline)
void set_title (Array/String $title)
void set_version (String $v)
String to_xml ()
Variables
mixed $auth (line 309)
mixed $author = array() (line 311)
mixed $endpoint (line 308)
mixed $entries = array() (line 319)
mixed $err_no (line 320)
mixed $generator = array() (line 316)
mixed $id (line 315)
mixed $info = array() (line 317)
mixed $links = array() (line 313)
mixed $modified (line 318)
mixed $tagline = array() (line 314)
mixed $title = array() (line 310)
mixed $version (line 312)
Methods
Constructor AtomFeed (line 329)

Creates an AtomFeed object, based on the details specified. If $xml is provided, then it is parsed to populate the object, otherwise the endpoint is accessed and it is populated from the response XML. If all values are false or omitted, then an empty AtomFeed is created, and awaits the use of set_*() functions to set it up manually.

AtomFeed AtomFeed ([String $endpoint = false], [AuthObj $auth = false], [String $xml = false])
  • String $endpoint
  • AuthObj $auth
  • String $xml
add_entry (line 669)

Add an AtomEntry object to the array of entries that make up this AtomFeed

void add_entry (AtomEntry $entry)
add_link (line 622)

Adds a link to the links array with the details as per the associative array passed in. Requires href, rel, title and type

void add_link (String $href, String $rel, [String $title = ''], String $type)
  • String $href
  • String $rel
  • String $title
  • String $type
error (line 894)

Returns the last error registered in this class, or FALSE if none

Int/FALSE error ()
extract_attribs (line 700)

Parses an XML/HTML string and returns an associative array containing key/value pairs

Array/FALSE extract_attribs (String $str)
  • String $str
from_xml (line 715)

Populates the variables of the AtomFeed, based on a complete XML representation of it.

void from_xml (String $xml)
  • String $xml
get_auth (line 372)

Returns the currently set authentication object for this AtomFeed, or FALSE if not set

AuthObj/FALSE get_auth ()
get_endpoint (line 399)

Returns the endpoint for this AtomFeed if specified, or FALSE if not

String/FALSE get_endpoint ()
get_entries (line 655)

Returns an array containing AtomEntries for each entry in this AtomFeed, or FALSE if none are set

Array/FALSE get_entries ()
get_generator (line 600)

Returns either a specific element of the generator, or the entire array of data if none is specified.

Array/String/FALSE get_generator ([String $elem = false])
  • String $elem
get_id (line 443)

Returns the contents of the <id> element for this AtomFeed

String get_id ()
get_info (line 581)

Returns either the requested individual attribute of the info element, the entire array, or FALSE if it's not set.

Array/String/FALSE get_info ([mixed $elem = false])
get_links (line 634)

Filters the <link>s of this AtomFeed for ones where the $key matches the $val and returns an array of them, otherwise returns all links

Array get_links ([String $key = false], [String $val = false])
  • String $key
  • String $val
get_modified (line 552)

Get the modified date for this feed, or FALSE if it's not set

String/FALSE get_modified ()
get_tagline (line 510)

Returns either a specific element of the tagline, or the entire array of data if none is specified.

Array/String/FALSE get_tagline ([String $elem = false])
  • String $elem
get_title (line 475)

Returns either a specific element of the title, or the entire array of data if none is specified.

Array/String/FALSE get_title ([String $elem = false])
  • String $elem
get_version (line 421)

Returns the version number specified for this AtomFeed in the <feed> element

String get_version ()
init (line 679)

Initiates the AtomFeed object from a URI by loading the data, then parsing it as XML. Returns an HTTP response code on error, or TRUE if successful.

  • return: on error
TRUE/Int init ()
set_auth (line 359)

Sets the authentication object to use for this AtomFeed

void set_auth (AuthObj $auth)
  • AuthObj $auth
set_endpoint (line 386)

Set the endpoint for accessing this AtomFeed. Must be a fully-qualified URI starting with 'http'

void set_endpoint (String $uri)
  • String $uri
set_generator (line 529)

Sets the details of the generator for this AtomFeed.

void set_generator (Array $gen)
  • Array $gen
set_id (line 435)

Sets the <id> element contents for the AtomFeed.

void set_id (String $i)
  • String $i
set_info (line 566)

Set the info element details. If a string is passed in, then defaults to the info contents

void set_info (Array/String $info)
  • Array/String $info
set_modified (line 542)

Set the modified date for this feed

void set_modified (String $date)
  • String $date
set_tagline (line 494)

Sets the details of the tagline for this AtomFeed

void set_tagline (Array/String $tagline)
  • Array/String $tagline
set_title (line 457)

Sets the title for this AtomFeed.

void set_title (Array/String $title)
  • Array/String $title
set_version (line 413)

Set the version number for this AtomFeed (goes in the <feed> element)

void set_version (String $v)
  • String $v
to_xml (line 795)

Returns an XML/String representation of the entire AtomFeed, including header values and all AtomEntries found in $this->entries.

String to_xml ()

Documentation generated on Sun, 16 Oct 2005 14:55:03 -0700 by phpDocumentor 1.3.0RC3