';
/**
* Cache the individual feed elements so they don't need to be searched for
* on every operation.
* @return array
*/
protected function _buildListItemCache()
{
$items = array();
foreach ($this->_element->childNodes as $child) {
if ($child->localName == 'item') {
$items[] = $child;
}
}
// Brute-force search for - elements if we haven't found any so
// far.
if (!count($items)) {
foreach ($this->_element->ownerDocument->getElementsByTagName('item') as $child) {
$items[] = $child;
}
}
return $items;
}
}