Reputation: 1241
I have a src/Shell/AppShell.php
class that is extended to all other shell classes and which contains common methods used by all other classes.
In other words, this class doesn't contain any method callable directly.
If I launch the console:
bin/cake
the class is automatically detected and is shown:
$ bin/cake
Welcome to CakePHP v3.0.6 Console
[...]
Available Shells:
[...]
[MyPlugin] app, compress, install
[...]
$ bin/cake MeTools.app
Usage:
cake my_plugin.app [-h] [-v] [-q]
Options:
--help, -h Display this help.
--verbose, -v Enable verbose output.
--quiet, -q Enable quiet output.
How to hide it and not make it executable? Thanks.
Upvotes: 0
Views: 106
Reputation: 60463
The available shells are being retrieved by scanning the shell folders for .php
files.
Exclusions are only made to the list of shells that live in the main app and the core (AppShell
, CommandListShell
and CompletionShell
are being hidden by default), the plugin shell list is not going to be filtered, so the only way to hide such a shell would be to either
.php
file extension (not a very good idea as it breaks the default PSR-4 autoloader)Upvotes: 1