/var/www/vhosts/ihelp.ro/_OLD/vendor/cakephp/cakephp/src/Console
NameSizeModeActions
Command/-0755rm
Exception/-0755rm
Arguments.php38580644editdlrm
BaseCommand.php80360644editdlrm
Command.php1760644editdlrm
CommandCollection.php72110644editdlrm
CommandCollectionAwareInterface.php10220644editdlrm
CommandFactory.php14310644editdlrm
CommandFactoryInterface.php9960644editdlrm
CommandInterface.php16980644editdlrm
CommandRunner.php125360644editdlrm
CommandScanner.php48280644editdlrm
composer.json11730644editdlrm
ConsoleErrorHandler.php2340644editdlrm
ConsoleInput.php28750644editdlrm
ConsoleInputArgument.php54920644editdlrm
ConsoleInputOption.php81320644editdlrm
ConsoleInputSubcommand.php39040644editdlrm
ConsoleIo.php206420644editdlrm
ConsoleOptionParser.php303260644editdlrm
ConsoleOutput.php97170644editdlrm
Helper.php16750644editdlrm
HelperRegistry.php33460644editdlrm
HelpFormatter.php72160644editdlrm
README.md33210644editdlrm
Shell.php293530644editdlrm
ShellDispatcher.php122240644editdlrm
TaskRegistry.php30050644editdlrm
Edit: /var/www/vhosts/ihelp.ro/_OLD/vendor/cakephp/cakephp/src/Console/README.md (3321B)
[![Total Downloads](https://img.shields.io/packagist/dt/cakephp/http.svg?style=flat-square)](https://packagist.org/packages/cakephp/console) [![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE.txt) # CakePHP Console Library This library provides a framework for building command line applications from a set of commands. It provides abstractions for defining option and argument parsers, and dispatching commands. # Getting Started To start, define an an entry point script and Application class that defines bootstrap logic, and binds your commands. Lets put our entrypoint script in `bin/tool.php`: ```php #!/usr/bin/php -q run($argv)); ```` For our `Application` class we can start with: ```php add('hello', HelloCommand::class); return $commands; } } ``` Next we'll build a very simple `HelloCommand`: ```php addArgument('name', [ 'required' => true, 'help' => 'The name to say hello to', ]) ->addOption('color', [ 'choices' => ['none', 'green'], 'default' => 'none', 'help' => 'The color to use.' ]); return $parser; } public function execute(Arguments $args, ConsoleIo $io): ?int { $color = $args->getOption('color'); if ($color === 'none') { $io->out("Hello {$args->getArgument('name')}"); } elseif ($color == 'green') { $io->out("Hello {$args->getArgument('name')}"); } return static::CODE_SUCCESS; } } ``` Next we can run our command with `php bin/tool.php hello Syd`. To learn more about the various features we've used in this example read the docs: * [Option Parsing](https://book.cakephp.org/4/en/console-commands/option-parsers.html) * [Input & Output](https://book.cakephp.org/4/en/console-commands/input-output.html)