コード例 #1
0
ファイル: processor.php プロジェクト: jacomyma/GEXF-Atlas
 /**
  * Parses the XML element $node and creates modules in the feed or
  * feed item $item.
  *
  * @param ezcFeedEntryElement|ezcFeed $item The feed or feed item which will contain the modules
  * @param DOMElement $node The XML element from which to get the module elements
  * @param string $tagName The XML tag name (if it contains ':' it will be considered part of a module)
  * @ignore
  */
 protected function parseModules($item, DOMElement $node, $tagName)
 {
     $supportedModules = ezcFeed::getSupportedModules();
     if (strpos($tagName, ':') !== false) {
         list($prefix, $key) = explode(':', $tagName);
         $moduleName = isset($this->usedPrefixes[$prefix]) ? $this->usedPrefixes[$prefix] : null;
         if (isset($supportedModules[$moduleName])) {
             $module = $item->hasModule($moduleName) ? $item->{$moduleName} : $item->addModule($moduleName);
             $module->parse($key, $node);
         }
     }
 }