2017 © Pedro Peláez
 

library exec-wrapper

Allows to execute applications from command line.

image

ivol/exec-wrapper

Allows to execute applications from command line.

  • Thursday, June 30, 2016
  • by ivol
  • Repository
  • 1 Watchers
  • 0 Stars
  • 97 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

exec-wrapper

Latest Stable Version Build Status Code Coverage Scrutinizer Quality Score Total Downloads, (*1)

Execution wrapper is extension implements execution of external application in OOP way. Also allows to add listener before and after execution., (*2)

Installation

Add exec-wrapper to your Composer project:, (*3)

composer require ivol/exec-wrapper

Usage

It is really simple:, (*4)

<php>
// Autoload here
use ivol/ExecutionWrapper;

$wrapper = new ExecutionWrapper();
$result = $wrapper->execute('echo %s', ['123']);
if ($result->getReturnCode() == 0) {
    echo('Success');
} else {
    echo('Failure');
}
echo($result->getOutput());
</php>

If you want to use Event System then you should configure event dispatcher:, (*5)

...
$dispatcher = $wrapper->getEventDispatcher();
$dispatcher->addSubscriber(...);
$dispatcher->addListener(...);
...

For more information about event dispatcher see The EventDispatcher Component., (*6)

For additional examples see ExecutionWrapperIntegrationTest., (*7)

Configuration:

You can configure behaviour of args and command escaping by passing config array to ExecWrapper., (*8)

For configuration option names please see ExecWrapperConfiguration., (*9)

License

exec-wrapper is released under the MIT License., (*10)

The Versions

30/06 2016

dev-master

9999999-dev

Allows to execute applications from command line.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dzmitry Shalukhau

25/05 2016

v1.0.0-RC1

1.0.0.0-RC1

Allows to execute applications from command line.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dzmitry Shalukhau