2017 © Pedro Peláez
 

library command-builder

A generic shell command builder.

image

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

The README.md

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'; }; }

The Versions

25/06 2018

dev-master

9999999-dev

A generic shell command builder.

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Jelle Sebreghts

25/06 2018

1.0.1

1.0.1.0

A generic shell command builder.

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Jelle Sebreghts

25/06 2018

dev-develop

dev-develop

A generic shell command builder.

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Jelle Sebreghts

22/06 2018

1.0.0

1.0.0.0

A generic shell command builder.

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Jelle Sebreghts