private function addEntries($entry, $ind = 1, $path = '')
	{
		// If it's an array, loop through it
		if (is_array($entry))
		{
			foreach ($entry as $element => $entry)
			{
				// If this is just another directory, output an element
				if (is_string($element) && !empty($path))
				{
					$this->output->addLine(
						$element,
						array(
							'color'       => 'blue',
							'indentation' => $ind+2
						)
					);
				}

				// Dive deeper - if element is string, add it to our path
				$this->addEntries($entry, $ind+2, $path . ((is_string($element)) ? "\\{$element}" : ''));
			}
		}
		else
		{
			$this->output->addLine(
				$entry,
				array(
					'color'       => (($ind > 3) ? 'blue' : 'green'),
					'indentation' => $ind
				)
			);

			// Increment indentation
			$ind += 2;

			// Get this command's methods
			$reflection = new \ReflectionClass(__NAMESPACE__ . $path . '\\' . $entry);
			$methods    = $reflection->getMethods();

			foreach ($methods as $method)
			{
				// We're assuming here that all public methods are available to be called
				if ($method->isPublic() && !$method->isConstructor() && $method->name != 'execute' && $method->name != 'help')
				{
					$this->output->addLine(
						$method->name,
						array(
							'color'       => 'yellow',
							'indentation' => $ind
						)
					);
				}
			}
		}
	}
private function addEntries($entry, $ind = 1, $path = '')
	{
		// If it's an array, loop through it
		if (is_array($entry))
		{
			foreach ($entry as $element => $entry)
			{
				// If this is just another directory, output an element
				if (is_string($element) && !empty($path))
				{
					$this->output->addLine(
						$element,
						array(
							'color'       => 'blue',
							'indentation' => $ind+2
						)
					);
				}

				// Dive deeper - if element is string, add it to our path
				$this->addEntries($entry, $ind+2, $path . ((is_string($element)) ? "\\{$element}" : ''));
			}
		}
		else
		{
			$this->output->addLine(
				$entry,
				array(
					'color'       => (($ind > 3) ? 'blue' : 'green'),
					'indentation' => $ind
				)
			);

			// Increment indentation
			$ind += 2;

			// Get this command's methods
			$reflection = new \ReflectionClass(__NAMESPACE__ . $path . '\\' . $entry);
			$methods    = $reflection->getMethods();

			foreach ($methods as $method)
			{
				// We're assuming here that all public methods are available to be called
				if ($method->isPublic() && !$method->isConstructor() && $method->name != 'execute' && $method->name != 'help')
				{
					$this->output->addLine(
						$method->name,
						array(
							'color'       => 'yellow',
							'indentation' => $ind
						)
					);
				}
			}
		}
	}
private function addEntries ( $ entry , $ ind = 1 , $ path = '' ) { // If it's an array, loop through it if ( is_array ( $ entry ) ) { foreach ( $ entry as $ element => $ entry ) { // If this is just another directory, output an element if ( is_string ( $ element ) && ! empty ( $ path ) ) { $ this -> output -> addLine ( $ element , array ( 'color' => 'blue' , 'indentation' => $ ind + 2 ) ) ; } // Dive deeper - if element is string, add it to our path $ this -> addEntries ( $ entry , $ ind + 2 , $ path . ( ( is_string ( $ element ) ) ? "\\{$element}" : '' ) ) ; } } else { $ this -> output -> addLine ( $ entry , array ( 'color' => ( ( $ ind > 3 ) ? 'blue' : 'green' ) , 'indentation' => $ ind ) ) ; // Increment indentation $ ind += 2 ; // Get this command's methods $ reflection = new \ ReflectionClass ( __NAMESPACE__ . $ path . '\\' . $ entry ) ; $ methods = $ reflection -> getMethods ( ) ; foreach ( $ methods as $ method ) { // We're assuming here that all public methods are available to be called if ( $ method -> isPublic ( ) && ! $ method -> isConstructor ( ) && $ method -> name != 'execute' && $ method -> name != 'help' ) { $ this -> output -> addLine ( $ method -> name , array ( 'color' => 'yellow' , 'indentation' => $ ind ) ) ; } } } }
Output command entries

@param   mixed   $entry  Item(s) to output
@param   int     $ind    Indentation level
@param   string  $path   Path to current entry
@return  void
Output command entries