diff options
author | Zach Copley <zach@status.net> | 2010-02-10 14:24:16 -0800 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-02-11 13:56:05 -0800 |
commit | ce3c3be1bf971329f82bedbf3aae636e3c8ecbf9 (patch) | |
tree | e8072c70df5243c78740e2179b034edcfee2b4ce /lib/atom10entry.php | |
parent | 1773d12a24d2720cdb6c1b517999cac1f708b355 (diff) |
Utility classes for atom feeds
Diffstat (limited to 'lib/atom10entry.php')
-rw-r--r-- | lib/atom10entry.php | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/lib/atom10entry.php b/lib/atom10entry.php new file mode 100644 index 000000000..1b79ce7ad --- /dev/null +++ b/lib/atom10entry.php @@ -0,0 +1,58 @@ +<?php + +class Atom10EntryException extends Exception +{ +} + +class Atom10Entry extends XMLStringer +{ + private $namespaces; + private $categories; + private $content; + private $contributors; + private $id; + private $links; + private $published; + private $rights; + private $source; + private $summary; + private $title; + + function __construct($indent = true) { + parent::__construct($indent); + $this->namespaces = array(); + } + + function addNamespace($namespace, $uri) + { + $ns = array($namespace => $uri); + $this->namespaces = array_merge($this->namespaces, $ns); + } + + function initEntry() + { + + } + + function endEntry() + { + + } + + function validate + { + + } + + function getString() + { + $this->validate(); + + $this->initEntry(); + $this->renderEntries(); + $this->endEntry(); + + return $this->xw->outputMemory(); + } + +}
\ No newline at end of file |