library cli
Virge::Cli is used to create console commands in the Virge framework
virge/cli
Virge::Cli is used to create console commands in the Virge framework
- Tuesday, February 27, 2018
- by siosphere
- Repository
- 1 Watchers
- 0 Stars
- 207 Installations
- PHP
- 8 Dependents
- 0 Suggesters
- 1 Forks
- 0 Open issues
- 10 Versions
- 3 % Grown
Virge::Cli
Used to create and run console commands, (*1)
Creating a command
<?php
use Virge\Cli;
use Virge\Cli\Component\{
Command,
Input
};
class MyCommand extends Command
{
const COMMAND = 'my_command';
const COMMAND_HELP = 'some help text';
const COMMAND_USAGE = 'my_command [--someOption] arg1';
public function run(Input $input)
{
if($input->getOption('someOption')) {
Cli::success("Something worked!");
} else {
Cli::error("Oops");
}
}
}
Cli::add(MyCommand::COMMAND, MyCommand::class)
->setHelpText(MyCommand::COMMAND_HELP)
->setUsage(MyCommand::COMMAND_USAGE)
;
v4.x-dev
4.9999999.9999999.9999999-dev
Virge::Cli is used to create console commands in the Virge framework
Sources
Download
The Requires
by
Michael Kramer
v4.0.0
4.0.0.0
Virge::Cli is used to create console commands in the Virge framework
Sources
Download
The Requires
by
Michael Kramer
dev-master
9999999-dev
Virge::Cli is used to create console commands in the Virge framework
Sources
Download
The Requires
by
Michael Kramer
3.x-dev
3.9999999.9999999.9999999-dev
Virge::Cli is used to create console commands in the Virge framework
Sources
Download
The Requires
by
Michael Kramer
v3.0.3
3.0.3.0
Virge::Cli is used to create console commands in the Virge framework
Sources
Download
The Requires
by
Michael Kramer
v3.0.2
3.0.2.0
Virge::Cli is used to create console commands in the Virge framework
Sources
Download
The Requires
by
Michael Kramer
v3.0.0
3.0.0.0
Virge::Cli is used to create console commands in the Virge framework
Sources
Download
The Requires
by
Michael Kramer