private function mergeCommands($commands)
	{
		$parsed = array();

		// Loop through commands
		foreach ($commands as $command)
		{
			$bits = array();

			// Break up namespaced commands
			if (strpos($command, '\\'))
			{
				$bits    = explode('\\', $command);
				$command = $bits[count($bits)-1];
				unset($bits[count($bits)-1]);
			}

			$aux =& $parsed;

			// Loop through bits and build path to element we want to set
			foreach ($bits as $b)
			{
				$aux =& $aux[$b];
			}

			// Set element
			$aux[] = $command;
		}

		return $parsed;
	}
private function mergeCommands($commands)
	{
		$parsed = array();

		// Loop through commands
		foreach ($commands as $command)
		{
			$bits = array();

			// Break up namespaced commands
			if (strpos($command, '\\'))
			{
				$bits    = explode('\\', $command);
				$command = $bits[count($bits)-1];
				unset($bits[count($bits)-1]);
			}

			$aux =& $parsed;

			// Loop through bits and build path to element we want to set
			foreach ($bits as $b)
			{
				$aux =& $aux[$b];
			}

			// Set element
			$aux[] = $command;
		}

		return $parsed;
	}
private function mergeCommands ( $ commands ) { $ parsed = array ( ) ; // Loop through commands foreach ( $ commands as $ command ) { $ bits = array ( ) ; // Break up namespaced commands if ( strpos ( $ command , '\\' ) ) { $ bits = explode ( '\\' , $ command ) ; $ command = $ bits [ count ( $ bits ) - 1 ] ; unset ( $ bits [ count ( $ bits ) - 1 ] ) ; } $ aux = & $ parsed ; // Loop through bits and build path to element we want to set foreach ( $ bits as $ b ) { $ aux = & $ aux [ $ b ] ; } // Set element $ aux [ ] = $ command ; } return $ parsed ; }
Merge flat list of commands into dimensional array

@param   array  $commands  The commands to parse
@return  array
Merge flat list of commands into dimensional array