src/FS/File/Configuration/Reader.php
protected function loadXmlSection( $node, $path = NULL )
	{
		$path	.= $path ? '.' : '';																//  extend path by delimiter
		foreach( $node as $child )																	//  iterate node children
		{
			$name	= $child->getAttribute( 'name' );												//  get node name of child
			switch( $child->getName() ){															//  dispatch on node name
				case 'section':																		//  section node
					$this->loadXmlSection( $child, $path.$name );									//  load child section
					break;
				case 'value':																		//  pair node
					$type	= 'string';																//  default type: string
					if( $child->hasAttribute( 'type' ) )											//  type attribute is set
						$type	= $child->getAttribute( 'type' );									//  realize type attribute
					$value	= (string) $child;														//  convert node content to value string
					settype( $value, $type );														//  apply type to value
					$this->pairs[$path.$name]	= $value;											//  register pair
					break;
			}
		}
	}
protected function loadXmlSection( $node, $path = NULL )
	{
		$path	.= $path ? '.' : '';																//  extend path by delimiter
		foreach( $node as $child )																	//  iterate node children
		{
			$name	= $child->getAttribute( 'name' );												//  get node name of child
			switch( $child->getName() ){															//  dispatch on node name
				case 'section':																		//  section node
					$this->loadXmlSection( $child, $path.$name );									//  load child section
					break;
				case 'value':																		//  pair node
					$type	= 'string';																//  default type: string
					if( $child->hasAttribute( 'type' ) )											//  type attribute is set
						$type	= $child->getAttribute( 'type' );									//  realize type attribute
					$value	= (string) $child;														//  convert node content to value string
					settype( $value, $type );														//  apply type to value
					$this->pairs[$path.$name]	= $value;											//  register pair
					break;
			}
		}
	}
protected function loadXmlSection ( $ node , $ path = NULL ) { $ path .= $ path ? '.' : '' ; //  extend path by delimiter foreach ( $ node as $ child ) //  iterate node children { $ name = $ child -> getAttribute ( 'name' ) ; //  get node name of child switch ( $ child -> getName ( ) ) { //  dispatch on node name case 'section' : //  section node $ this -> loadXmlSection ( $ child , $ path . $ name ) ; //  load child section break ; case 'value' : //  pair node $ type = 'string' ; //  default type: string if ( $ child -> hasAttribute ( 'type' ) ) //  type attribute is set $ type = $ child -> getAttribute ( 'type' ) ; //  realize type attribute $ value = ( string ) $ child ; //  convert node content to value string settype ( $ value , $ type ) ; //  apply type to value $ this -> pairs [ $ path . $ name ] = $ value ; //  register pair break ; } } }
Reads sections and values of a XML file node, recursivly, and stores pairs in-situ.
@access		protected
@param		XML_Element	$node			Section XML node to read
@param		string		$path			Path to this section
@return		void
Reads sections and values of a XML file node recursivly and stores pairs in - situ .