src/XML/Atom/Parser.php
protected function parseNodes( $nodes, $template = array() )
	{
		$target	= $template;
		foreach( $nodes as $nodeName => $node )
		{
			$language	= $this->getNodeLanguage( $node );
			switch( $nodeName )
			{
				case 'author':
				case 'constributor':
					$target[$nodeName][]	= $this->parseNodes( $node, $this->emptyPerson );
					break;
				case 'entry':
					$this->entries[]		= $this->parseNodes( $node, $this->emptyEntry );
					break;
				case 'source':
					$target[$nodeName]		= $this->parseNodes( $node, $this->emptyChannelData );
					break;
				case 'category':
					$target[$nodeName][]	= $this->createAttributeNode( $node, $this->emptyCategory );
					break;
				case 'link':
					$target[$nodeName][]	= $this->createAttributeNode( $node, $this->emptyLink );
					break;
				case 'generator':
					$target[$nodeName]		= $this->createAttributeNode( $node, $this->emptyGenerator );
					break;
				case 'title':
				case 'subtitle':
				case 'summary':
					$target[$nodeName]		= $this->createAttributeNode( $node, $this->emptyText );
					break;
				case 'icon':
				case 'logo':
				default:
					$target[$nodeName]		= (string) $node;
			}
		}
		return $target;
	}
protected function parseNodes( $nodes, $template = array() )
	{
		$target	= $template;
		foreach( $nodes as $nodeName => $node )
		{
			$language	= $this->getNodeLanguage( $node );
			switch( $nodeName )
			{
				case 'author':
				case 'constributor':
					$target[$nodeName][]	= $this->parseNodes( $node, $this->emptyPerson );
					break;
				case 'entry':
					$this->entries[]		= $this->parseNodes( $node, $this->emptyEntry );
					break;
				case 'source':
					$target[$nodeName]		= $this->parseNodes( $node, $this->emptyChannelData );
					break;
				case 'category':
					$target[$nodeName][]	= $this->createAttributeNode( $node, $this->emptyCategory );
					break;
				case 'link':
					$target[$nodeName][]	= $this->createAttributeNode( $node, $this->emptyLink );
					break;
				case 'generator':
					$target[$nodeName]		= $this->createAttributeNode( $node, $this->emptyGenerator );
					break;
				case 'title':
				case 'subtitle':
				case 'summary':
					$target[$nodeName]		= $this->createAttributeNode( $node, $this->emptyText );
					break;
				case 'icon':
				case 'logo':
				default:
					$target[$nodeName]		= (string) $node;
			}
		}
		return $target;
	}
protected function parseNodes ( $ nodes , $ template = array ( ) ) { $ target = $ template ; foreach ( $ nodes as $ nodeName => $ node ) { $ language = $ this -> getNodeLanguage ( $ node ) ; switch ( $ nodeName ) { case 'author' : case 'constributor' : $ target [ $ nodeName ] [ ] = $ this -> parseNodes ( $ node , $ this -> emptyPerson ) ; break ; case 'entry' : $ this -> entries [ ] = $ this -> parseNodes ( $ node , $ this -> emptyEntry ) ; break ; case 'source' : $ target [ $ nodeName ] = $ this -> parseNodes ( $ node , $ this -> emptyChannelData ) ; break ; case 'category' : $ target [ $ nodeName ] [ ] = $ this -> createAttributeNode ( $ node , $ this -> emptyCategory ) ; break ; case 'link' : $ target [ $ nodeName ] [ ] = $ this -> createAttributeNode ( $ node , $ this -> emptyLink ) ; break ; case 'generator' : $ target [ $ nodeName ] = $ this -> createAttributeNode ( $ node , $ this -> emptyGenerator ) ; break ; case 'title' : case 'subtitle' : case 'summary' : $ target [ $ nodeName ] = $ this -> createAttributeNode ( $ node , $ this -> emptyText ) ; break ; case 'icon' : case 'logo' : default : $ target [ $ nodeName ] = ( string ) $ node ; } } return $ target ; }
Parses Nodes and returns Array Structure.
@access		protected
@param		XML_Element		$nodes			XML_Element containing Child Nodes to parse
@param		array			$template		Template of new Structure (emptyCategory|emptyChannelData|emptyEntry|emptyGenerator|emptyLink|emptyPerson|emptyText)
@return		array
Parses Nodes and returns Array Structure .