public static function extractTreeData($data, $recursive = false)
    {
        $returnValue = array();




        if(isset($data['data'])){
        	$data = array($data);
        }
        foreach($data as $node){
        	$returnValue[$node['attributes']['id']] = $node['data'];
        	if(isset($node['children'])){
        		$returnValue = array_merge($returnValue, self::extractTreeData($node['children'], true));
        	}
        }



        return (array) $returnValue;
    }
public static function extractTreeData($data, $recursive = false)
    {
        $returnValue = array();




        if(isset($data['data'])){
        	$data = array($data);
        }
        foreach($data as $node){
        	$returnValue[$node['attributes']['id']] = $node['data'];
        	if(isset($node['children'])){
        		$returnValue = array_merge($returnValue, self::extractTreeData($node['children'], true));
        	}
        }



        return (array) $returnValue;
    }
public static function extractTreeData ( $ data , $ recursive = false ) { $ returnValue = array ( ) ; if ( isset ( $ data [ 'data' ] ) ) { $ data = array ( $ data ) ; } foreach ( $ data as $ node ) { $ returnValue [ $ node [ 'attributes' ] [ 'id' ] ] = $ node [ 'data' ] ; if ( isset ( $ node [ 'children' ] ) ) { $ returnValue = array_merge ( $ returnValue , self :: extractTreeData ( $ node [ 'children' ] , true ) ) ; } } return ( array ) $ returnValue ; }
Short description of method extractTreeData

@access public
@author Bertrand Chevrier, <bertrand.chevrier@tudor.lu>
@param  array $data
@param  boolean $recursive
@return array
Short description of method extractTreeData