Zend Framework 2 - Console usage a speed help

22 Aug 2013 - Tags: zf2, php

With Zend Framework is very easy to write a command line tool to manage different things. But what if there are more commands? How do you remeber them all?

namespace ModuleTest;
use Zend\Console\Adapter\AdapterInterface;
class Module {
	public function getConsoleUsage(AdapterInterface $console)
		return array(
			array('test <params1> <params2> [--params=]', 'Description of test command'),
			array('run <action>', 'Start anction')

You can write this function in a Module.php file, and create a basic helper to help you see when you write a bad command.

English by Rali :smile: Thanks!!!! :smile: