Subversion Repositories eFlore/Applications.cel

Rev

Rev 580 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 580 Rev 612
Line 27... Line 27...
27
 *
27
 *
28
 * @author    James Stewart <james@jystewart.net>
28
 * @author    James Stewart <james@jystewart.net>
29
 * @version    Release: @package_version@
29
 * @version    Release: @package_version@
30
 * @package XML_Feed_Parser
30
 * @package XML_Feed_Parser
31
 */
31
 */
32
class XML_Feed_Parser_RSS11Element extends XML_Feed_Parser_RSS11
32
class XmlFeedParserRss11Element extends XmlFeedParserRss11 {
33
{
-
 
34
    /**
33
    /**
35
     * This will be a reference to the parent object for when we want
34
     * This will be a reference to the parent object for when we want
36
     * to use a 'fallback' rule 
35
     * to use a 'fallback' rule 
37
     * @var XML_Feed_Parser_RSS1
36
     * @var XML_Feed_Parser_RSS1
38
     */
37
     */
Line 76... Line 75...
76
     * Store useful information for later.
75
     * Store useful information for later.
77
     *
76
     *
78
     * @param   DOMElement  $element - this item as a DOM element
77
     * @param   DOMElement  $element - this item as a DOM element
79
     * @param   XML_Feed_Parser_RSS1 $parent - the feed of which this is a member
78
     * @param   XML_Feed_Parser_RSS1 $parent - the feed of which this is a member
80
     */
79
     */
81
    function __construct(DOMElement $element, $parent, $xmlBase = '')
80
    function __construct(DOMElement $element, $parent, $xmlBase = '') {
82
    {
-
 
83
        $this->model = $element;
81
        $this->model = $element;
84
        $this->parent = $parent;
82
        $this->parent = $parent;
85
    }
83
    }
Line 86... Line 84...
86
 
84
 
Line 91... Line 89...
91
     * simulate it using the rdf:about attribute of the entry element. This cannot
89
     * simulate it using the rdf:about attribute of the entry element. This cannot
92
     * be relied upon for unique IDs but may prove useful.
90
     * be relied upon for unique IDs but may prove useful.
93
     *
91
     *
94
     * @return  string|false
92
     * @return  string|false
95
     */
93
     */
96
    function getId()
94
    function getId() {
97
    {
-
 
98
        if ($this->model->attributes->getNamedItem('about')) {
95
        if ($this->model->attributes->getNamedItem('about')) {
99
            return $this->model->attributes->getNamedItem('about')->nodeValue;
96
            return $this->model->attributes->getNamedItem('about')->nodeValue;
100
        }
97
        }
101
        return false;
98
        return false;
102
    }
99
    }
Line 108... Line 105...
108
     * the content module's element 'encoded'. Often, however, the 'description'
105
     * the content module's element 'encoded'. Often, however, the 'description'
109
     * element is used instead. We will offer that as a fallback.
106
     * element is used instead. We will offer that as a fallback.
110
     *
107
     *
111
     * @return  string|false
108
     * @return  string|false
112
     */
109
     */
113
    function getContent()
110
    function getContent() {
114
    {
-
 
115
        $options = array('encoded', 'description');
111
        $options = array('encoded', 'description');
116
        foreach ($options as $element) {
112
        foreach ($options as $element) {
117
            $test = $this->model->getElementsByTagName($element);
113
            $test = $this->model->getElementsByTagName($element);
118
            if ($test->length == 0) {
114
            if ($test->length == 0) {
119
                continue;
115
                continue;
Line 140... Line 136...
140
     * How RSS1.1 should support for enclosures is not clear. For now we will return
136
     * How RSS1.1 should support for enclosures is not clear. For now we will return
141
     * false.
137
     * false.
142
     *
138
     *
143
     * @return  false
139
     * @return  false
144
     */
140
     */
145
    function getEnclosure()
141
    function getEnclosure() {
146
    {
-
 
147
        return false;
142
        return false;
148
    }
143
    }
149
}
144
}
150
 
-
 
151
?>
145
?>
152
146