Class AtomHandler

Description

Habari AtomHandler class Produces Atom feeds and accepts Atom Publishing Protocol input

  • todo: Apply system error handling

Located in /system/classes/atomhandler.php (line 10)

ActionHandler
   |
   --AtomHandler
Variable Summary
mixed $user
Method Summary
AtomHandler __construct ()
void act_collection ()
void act_comments ([ $params = array()])
void act_entry ()
void act_rsd ()
SimpleXMLElement add_comments (SimpleXMLElement $xml, array $comments)
SimpleXMLElement add_posts (SimpleXMLElement $xml, array $posts)
SimpleXMLElement create_atom_wrapper ( $alternate,  $self,  $id)
void delete_entry (string $slug)
void get_collection ([array $params = array()])
void get_comments ([array $params = array()])
void get_entry (string $slug)
User is_auth ([bool $force = FALSE])
void post_collection ()
void put_entry (string $slug)
Variables
mixed $user = NULL (line 13)
  • access: public

Inherited Variables

Inherited from ActionHandler

ActionHandler::$action
ActionHandler::$handler_vars
Methods
Constructor __construct (line 19)

Constructor for AtomHandler class.

Set some default formatting for Atom output.

  • access: public
AtomHandler __construct ()
act_collection (line 237)

Handle incoming requests for Atom entry collections

  • access: public
void act_collection ()
act_comments (line 412)

Handle incoming requests for the Atom entry collection for all comments

void act_comments ([ $params = array()])
  • $params
act_entry (line 253)

function act_entry

'index' should be 'slug'

  • access: public
void act_entry ()
act_entry_comments (line 420)

Handle incoming requests for the Atom entry collection for comments on an entry

void act_entry_comments ()
act_introspection (line 365)

Handle incoming requests for the introspection document

  • access: public
void act_introspection ()
act_rsd (line 273)

Handle incoming requests for RSD

  • todo: Move the internal list of supported feeds into options to allow dynamic editing of capabilities
  • access: public
void act_rsd ()
act_tag_collection (line 404)

Handle incoming requests for the Atom entry collection for a specific tag

  • access: public
void act_tag_collection ()
add_comments (line 208)

Add comments as items in the provided xml structure

  • return: The resultant XML with added comments
  • access: public
SimpleXMLElement add_comments (SimpleXMLElement $xml, array $comments)
  • SimpleXMLElement $xml: The document to add to
  • array $comments: An array of Comments to add to the XML
add_posts (line 164)

Add posts as items in the provided xml structure

  • return: The resultant XML with added posts
  • access: public
SimpleXMLElement add_posts (SimpleXMLElement $xml, array $posts)
  • SimpleXMLElement $xml: The document to add to
  • array $posts: An array of Posts to add to the XML
create_atom_wrapper (line 70)

Creates a basic Atom-format XML structure

  • return: The requested Atom document
  • access: public
SimpleXMLElement create_atom_wrapper ( $alternate,  $self,  $id)
  • $alternate
  • $self
  • $id
delete_entry (line 580)

Delete a post based on the HTTP DELETE request via Atom

  • access: public
void delete_entry (string $slug)
  • string $slug: The post slug to delete
get_collection (line 598)

Output a post collection based on the provided parameters.

  • access: public
void get_collection ([array $params = array()])
  • array $params: An array of parameters as passed to Posts::get() to retrieve posts.
get_comments (line 435)

Output an Atom collection of comments based on the supplied parameters.

void get_comments ([array $params = array()])
  • array $params: An array of parameters passed to Comments::get() to retrieve comments
get_entry (line 481)

Output the Atom entry for a specific slug

  • access: public
void get_entry (string $slug)
  • string $slug: The slug to get the entry for
is_auth (line 47)

Check if a user is authenticated for Atom editing

  • return: The logged-in user
  • todo: This entire function should be put into the User class somehow.
  • todo: X-WSSE
User is_auth ([bool $force = FALSE])
  • bool $force: Force authorization? If so, basic HTTP_AUTH is displayed if not authed
post_collection (line 663)

Accepts an Atom entry for insertion as a new post.

  • access: public
void post_collection ()
put_entry (line 539)

Updates (editing) a post entry that is sent via APP.

  • access: public
void put_entry (string $slug)
  • string $slug: The slug of the entry to save

Inherited Methods

Inherited From ActionHandler

ActionHandler::act()
ActionHandler::act_redirect()
ActionHandler::__call()

Documentation generated on Thu, 30 Oct 2008 20:31:02 +0100 by phpDocumentor 1.3.2