1 | <?php |
||
30 | class Module implements BootstrapListenerInterface, ConfigProviderInterface, ConsoleBannerProviderInterface, |
||
31 | ConsoleUsageProviderInterface, InitProviderInterface |
||
32 | { |
||
33 | const DEFAULT_LAYOUT = 'noiselabs/zf-debug-utils/layout'; |
||
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | 10 | public function init(ModuleManagerInterface $manager) |
|
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | 11 | public function getConfig() |
|
50 | |||
51 | /** |
||
52 | * Listen to the bootstrap event. |
||
53 | * |
||
54 | * @param EventInterface|MvcEvent $e |
||
55 | * |
||
56 | * @return array|void |
||
57 | */ |
||
58 | 11 | public function onBootstrap(EventInterface $e) |
|
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | * |
||
71 | * @param Console $console |
||
72 | * |
||
73 | * @return string |
||
74 | */ |
||
75 | 1 | public function getConsoleBanner(Console $console) |
|
79 | |||
80 | /** |
||
81 | * @param Console $console |
||
82 | * |
||
83 | * @return array |
||
84 | */ |
||
85 | 1 | public function getConsoleUsage(Console $console) |
|
86 | { |
||
87 | return [ |
||
88 | 1 | '[ Routing ]', |
|
89 | '', |
||
90 | 'zfdebug routes export' => 'Exports all routes in CSV format', |
||
91 | 'zfdebug routes list' => 'Lists all routes', |
||
92 | 'zfdebug routes match [METHOD] [URL]' => 'Matches a URL to a Route', |
||
93 | ['Examples:'], |
||
94 | ['$ zfdebug routes export', ''], |
||
95 | ['$ zfdebug routes list', ''], |
||
96 | ['$ zfdebug routes match GET /users/123', ''], |
||
97 | ['$ zfdebug routes match POST /login', ''], |
||
98 | ]; |
||
99 | } |
||
100 | |||
101 | /** |
||
102 | * @param ServiceLocatorInterface $serviceLocator |
||
103 | * |
||
104 | * @return null|string |
||
105 | */ |
||
106 | 10 | private function getCurrentRouteName(ServiceLocatorInterface $serviceLocator) |
|
117 | } |
||
118 |