fishbones/core/DB.php
/**
	 * takes an array result from a query method of this class and return an DOMDocument with the data
	 *
	 * @param	array $arrayResul	array result 
	 *
	 * @return	DOMDocument		xml DOMDocument with result data
	 * 			
	 */
takes an array result from a query method of this class and return an DOMDocument with the data

@param       array $arrayResul       array result

@return      DOMDocument             xml DOMDocument with result data
takes an array result from a query method of this class and return an DOMDocument with the data @param array $arrayResul array result @return DOMDocument xml DOMDocument with result data
public function arrayResultAsXml( array $arrayResul ) {
		$dom = new DOMDocument('1.0', 'utf-8');
		$dataNode = $dom->appendChild(new DOMElement('data'));
		if ( is_array( $arrayResul ) ) {
			foreach( $arrayResul as $arrayRecor ) {
				$lineNode = $dataNode->appendChild( new DOMElement('line') );
				foreach( $arrayRecor as $x => $y ) {
					$cellNode = $lineNode->appendChild( new DOMElement( $x ) );
					$texNode = $dom->createTextNode( $y );
					$cellNode->appendChild( $texNode );
				}
			}
		}
		return $dom;
	}
public function arrayResultAsXml ( array $ arrayResul ) { $ dom = new DOMDocument ( '1.0' , 'utf-8' ) ; $ dataNode = $ dom -> appendChild ( new DOMElement ( 'data' ) ) ; if ( is_array ( $ arrayResul ) ) { foreach ( $ arrayResul as $ arrayRecor ) { $ lineNode = $ dataNode -> appendChild ( new DOMElement ( 'line' ) ) ; foreach ( $ arrayRecor as $ x => $ y ) { $ cellNode = $ lineNode -> appendChild ( new DOMElement ( $ x ) ) ; $ texNode = $ dom -> createTextNode ( $ y ) ; $ cellNode -> appendChild ( $ texNode ) ; } } } return $ dom ; }
takes an array result from a query method of this class and return an DOMDocument with the data
takes an array result from a query method of this class and return an DOMDocument with the data
//$cellNode = $lineNode->appendChild( new DOMElement( $x, $y ) );