PHP Класс Habari\AtomHandler

Наследование: extends ActionHandler
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$user

Открытые методы

Метод Описание
__construct ( ) Constructor for AtomHandler class.
act_collection ( ) Handle incoming requests for Atom entry collections
act_comments ( $params = [] ) Handle incoming requests for the Atom entry collection for all comments
act_entry ( ) function act_entry 'index' should be 'slug'
act_entry_comments ( ) Handle incoming requests for the Atom entry collection for comments on an entry
act_introspection ( ) Handle incoming requests for the introspection document
act_rsd ( ) Handle incoming requests for RSD
act_tag_collection ( ) Handle incoming requests for the Atom entry collection for a specific tag
add_comments ( SimpleXMLElement $xml, array $comments ) : SimpleXMLElement Add comments as items in the provided xml structure
add_pagination_links ( SimpleXMLElement $xml, integer $count ) : The Adds pagination link rels to feeds
add_posts ( SimpleXMLElement $xml, array $posts ) : SimpleXMLElement Add posts as items in the provided xml structure
create_atom_wrapper ( string $alternate, string $self, string $id, DateTime $updated = null ) : SimpleXMLElement Creates a basic Atom-format XML structure
delete_entry ( string $slug ) Delete a post based on the HTTP DELETE request via Atom
get_collection ( array $params = [] ) Output a post collection based on the provided parameters.
get_comments ( array $params = [] ) Output an Atom collection of comments based on the supplied parameters.
get_entry ( string $slug ) Output the Atom entry for a specific slug
is_auth ( boolean $force = false ) : User Check if a user is authenticated for Atom editing
post_collection ( ) Accepts an Atom entry for insertion as a new post.
put_entry ( string $slug ) Updates (editing) a post entry that is sent via APP.

Защищенные методы

Метод Описание
tidy_xml ( string $xml ) : string Use Tidy to tidy XML output for debugging by humans

Описание методов

__construct() публичный Метод

Set some default formatting for Atom output.
public __construct ( )

act_collection() публичный Метод

Handle incoming requests for Atom entry collections
public act_collection ( )

act_comments() публичный Метод

Handle incoming requests for the Atom entry collection for all comments
public act_comments ( $params = [] )

act_entry() публичный Метод

function act_entry 'index' should be 'slug'
public act_entry ( )

act_entry_comments() публичный Метод

Handle incoming requests for the Atom entry collection for comments on an entry
public act_entry_comments ( )

act_introspection() публичный Метод

Handle incoming requests for the introspection document
public act_introspection ( )

act_rsd() публичный Метод

Handle incoming requests for RSD
public act_rsd ( )

act_tag_collection() публичный Метод

Handle incoming requests for the Atom entry collection for a specific tag
public act_tag_collection ( )

add_comments() публичный Метод

Add comments as items in the provided xml structure
public add_comments ( SimpleXMLElement $xml, array $comments ) : SimpleXMLElement
$xml SimpleXMLElement The document to add to
$comments array An array of Comments to add to the XML
Результат SimpleXMLElement The resultant XML with added comments

add_posts() публичный Метод

Add posts as items in the provided xml structure
public add_posts ( SimpleXMLElement $xml, array $posts ) : SimpleXMLElement
$xml SimpleXMLElement The document to add to
$posts array An array of Posts to add to the XML
Результат SimpleXMLElement The resultant XML with added posts

create_atom_wrapper() публичный Метод

Creates a basic Atom-format XML structure
public create_atom_wrapper ( string $alternate, string $self, string $id, DateTime $updated = null ) : SimpleXMLElement
$alternate string the IRI of an alternate version.
$self string The preferred URI for retrieving Atom Feed Documents representing this Atom feed.
$id string a permanent, universally unique identifier for an the feed.
$updated DateTime The most recent update in the collection to which this feed applies.
Результат SimpleXMLElement The requested Atom document

delete_entry() публичный Метод

Delete a post based on the HTTP DELETE request via Atom
public delete_entry ( string $slug )
$slug string The post slug to delete

get_collection() публичный Метод

Output a post collection based on the provided parameters.
public get_collection ( array $params = [] )
$params array An array of parameters as passed to Posts::get() to retrieve posts.

get_comments() публичный Метод

Output an Atom collection of comments based on the supplied parameters.
public get_comments ( array $params = [] )
$params array An array of parameters passed to Comments::get() to retrieve comments

get_entry() публичный Метод

Output the Atom entry for a specific slug
public get_entry ( string $slug )
$slug string The slug to get the entry for

is_auth() публичный Метод

Check if a user is authenticated for Atom editing
public is_auth ( boolean $force = false ) : User
$force boolean Force authorization? If so, basic HTTP_AUTH is displayed if not authed
Результат User The logged-in user

post_collection() публичный Метод

Accepts an Atom entry for insertion as a new post.
public post_collection ( )

put_entry() публичный Метод

Updates (editing) a post entry that is sent via APP.
public put_entry ( string $slug )
$slug string The slug of the entry to save

tidy_xml() защищенный Метод

Use Tidy to tidy XML output for debugging by humans
protected tidy_xml ( string $xml ) : string
$xml string The unformatted input XML
Результат string Formatted XML

Описание свойств

$user публичное свойство

public $user