Changed and extended the Atom library a little so that the code for creating entries and feeds has been considerably simplified and reduced.

This commit is contained in:
Jozef Selesi
2008-11-23 12:41:41 +00:00
parent bdbb115296
commit 7485740d97
7 changed files with 153 additions and 68 deletions

View File

@@ -62,7 +62,8 @@ class Comments_Controller extends REST_Controller {
* @see Rest_Controller::_show($resource)
*/
public function _show($comment) {
switch (rest::output_format()) {
$output_format = rest::output_format();
switch ($output_format) {
case "xml":
rest::http_content_type(rest::XML);
print xml::to_xml($comment->as_array(), array("comment"));