lib/EarthIT/CMIPREST/ResultAssembler/CSVResultAssembler.php
public function assembleResult( EarthIT_CMIPREST_ActionResult $result, TOGoS_Action $action=null, $ctx=null ) {
		$rootRc = $result->getRootResourceClass();
		$columnHeaders = array();
		foreach( $rootRc->getFields() as $fn=>$field ) {
			$columnHeaders[] = $fn;
		}

		$itemCollections = $result->getItemCollections();
		$rows = array($columnHeaders);
		foreach( $itemCollections['root'] as $item ) {
			$row = array();
			foreach( $columnHeaders as $c ) {
				$row[$c] = $item[$c];
			}
			$rows[] = $row;
		}
		return $rows;
	}
public function assembleResult( EarthIT_CMIPREST_ActionResult $result, TOGoS_Action $action=null, $ctx=null ) {
		$rootRc = $result->getRootResourceClass();
		$columnHeaders = array();
		foreach( $rootRc->getFields() as $fn=>$field ) {
			$columnHeaders[] = $fn;
		}

		$itemCollections = $result->getItemCollections();
		$rows = array($columnHeaders);
		foreach( $itemCollections['root'] as $item ) {
			$row = array();
			foreach( $columnHeaders as $c ) {
				$row[$c] = $item[$c];
			}
			$rows[] = $row;
		}
		return $rows;
	}
public function assembleResult ( EarthIT_CMIPREST_ActionResult $ result , TOGoS_Action $ action = null , $ ctx = null ) { $ rootRc = $ result -> getRootResourceClass ( ) ; $ columnHeaders = array ( ) ; foreach ( $ rootRc -> getFields ( ) as $ fn => $ field ) { $ columnHeaders [ ] = $ fn ; } $ itemCollections = $ result -> getItemCollections ( ) ; $ rows = array ( $ columnHeaders ) ; foreach ( $ itemCollections [ 'root' ] as $ item ) { $ row = array ( ) ; foreach ( $ columnHeaders as $ c ) { $ row [ $ c ] = $ item [ $ c ] ; } $ rows [ ] = $ row ; } return $ rows ; }
Assemble a StorageResult into whatever format the thing that's
going to take the results needs.  Normally this will be an array.

@param EarthIT_CMIPREST_ActionResult $result the return value of the action
@param TOGoS_Action $action the action that was invoked to get this result
@param mixed $ctx some value representing the context in which the action was done
Assemble a StorageResult into whatever format the thing that s going to take the results needs . Normally this will be an array .