Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maestroerror/console-command-php
ccPHP is command processing class to provide CLI commands in Unix style (cmd - options - arg)
https://github.com/maestroerror/console-command-php
Last synced: 21 days ago
JSON representation
ccPHP is command processing class to provide CLI commands in Unix style (cmd - options - arg)
- Host: GitHub
- URL: https://github.com/maestroerror/console-command-php
- Owner: MaestroError
- License: mit
- Created: 2021-10-20T09:59:21.000Z (about 3 years ago)
- Default Branch: maestro
- Last Pushed: 2022-09-13T07:03:12.000Z (over 2 years ago)
- Last Synced: 2023-11-12T13:20:56.104Z (about 1 year ago)
- Language: PHP
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# console-command-php
ccPHP is command processing class to provide CLI commands in Unix style (cmd - options - arg)## installation
install with composer:
```
composer require maestroerror/console-command-php
```
### Usage example```
use maestroerror\console\Command;$command = new Command($argv);
print_r($command->get());
```
returns array like:
```
[
"command" => String,
"argument" => Array,
"options" => Array,
]
```--------------------------------
### To Do
- fix current class and rename/use as command read class
- add new global class ConsoleCommandPhp with static methods Run (reads and runs command) and Read (read command and returns array value)
- add main class to extend and use as parent class for class commands with livewire style: bool types for --options, string types for -valued=option and think out how to add arguments
- Make helper function which initialates parent class and help you create command in the fly, without static class writing (use chain)
- Seo, Documentation and Examples