library command-builder
A generic shell command builder.
digipolisgent/command-builder
A generic shell command builder.
- Monday, June 25, 2018
- by zero2one
- Repository
- 5 Watchers
- 0 Stars
- 39 Installations
- PHP
- 1 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 4 Versions
- 0 % Grown
Command builder
Code example
<?php
require_once 'vendor/autoload.php';
use DigipolisGent\CommandBuilder\CommandBuilder;
$builder = CommandBuilder::create('ls')
->addFlag('a')
->addFlag('l')
->pipeOutputTo('grep')
->addArgument('mydir')
->onSuccess('echo')
->addArgument('mydir already exists')
->onFailure(
CommandBuilder::create('mkdir')
->addArgument('mydir')
->onSuccess('echo')
->addArgument('mydir created')
);
print $builder;
Output
{ { { ls -a -l | grep 'mydir'; } && echo 'mydir already exists'; } || { mkdir 'mydir' && echo 'mydir created'; }; }
dev-master
9999999-dev
A generic shell command builder.
Sources
Download
MIT
The Requires
The Development Requires
by
Jelle Sebreghts
1.0.1
1.0.1.0
A generic shell command builder.
Sources
Download
MIT
The Requires
The Development Requires
by
Jelle Sebreghts
dev-develop
dev-develop
A generic shell command builder.
Sources
Download
MIT
The Requires
The Development Requires
by
Jelle Sebreghts
1.0.0
1.0.0.0
A generic shell command builder.
Sources
Download
MIT
The Requires
The Development Requires
by
Jelle Sebreghts