Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 461 Bytes

README.md

File metadata and controls

19 lines (15 loc) · 461 Bytes

Command Wrapper

Tiny Framework to build a command wrapper with process support from Symfony.

use JBR\CommandWrapper\Cli\ArgumentValue;
use JBR\CommandWrapper\Cli\FlagSet;
use JBR\CommandWrapper\Commander;

$git = new Commander('git');
$result = $git->run([ new ArgumentValue('checkout'), new FlagSet('orphan', 'develop') ]);

if ($result->isSuccess()) {
    echo $result->getOutput();
} else {
    echo $result->getErrorOutput();
}