1 | <?php |
||
11 | class HelpCommand implements Command |
||
12 | { |
||
13 | |||
14 | protected $console; |
||
15 | protected $cli; |
||
16 | |||
17 | public function __construct(Console $console, CLImate $cli) |
||
22 | |||
23 | public function help(Site $site) |
||
37 | |||
38 | private function table(Site $site, array $commands) |
||
51 | |||
52 | /** |
||
53 | * Get the command definitions this command provides |
||
54 | * |
||
55 | * @param \Buttress\Concrete\Locator\Site|null $site |
||
56 | * @return CommandManager[] A list containing a manager for each command this instance offers |
||
57 | * @throws \Exception |
||
58 | */ |
||
59 | public function getCommands(Site $site) |
||
69 | |||
70 | /** |
||
71 | * Register routes onto the route collector |
||
72 | * |
||
73 | * @param \Buttress\Concrete\Route\RouteCollector $collector |
||
74 | * @param \Buttress\Concrete\Locator\Site|null $site Null is passed when a concrete5 site wasn't located |
||
75 | * @return void |
||
76 | */ |
||
77 | public function registerRoutes(RouteCollector $collector, Site $site = null) |
||
81 | |||
82 | /** |
||
83 | * @param \Buttress\Concrete\Locator\Site $site |
||
84 | * @param $help |
||
85 | * @param $cli |
||
86 | */ |
||
87 | protected function outputDefaultUsage(Site $site, $help, $cli) |
||
97 | |||
98 | protected function outputComamndUsage(Site $site, $name, $cli) |
||
116 | } |
||
117 |