https://github.com/czproject/runner
Library for executing of external programs
https://github.com/czproject/runner
php runner
Last synced: over 1 year ago
JSON representation
Library for executing of external programs
- Host: GitHub
- URL: https://github.com/czproject/runner
- Owner: czproject
- License: other
- Created: 2016-03-05T15:21:28.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-03-17T12:12:01.000Z (over 3 years ago)
- Last Synced: 2025-03-12T12:47:00.069Z (over 1 year ago)
- Topics: php, runner
- Language: PHP
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# CzProject\Runner
[](https://github.com/czproject/runner/actions)
[](https://packagist.org/packages/czproject/runner)
[](https://github.com/czproject/runner/releases)
[](https://github.com/czproject/runner/blob/master/license.md)
## Installation
[Download a latest package](https://github.com/czproject/runner/releases) or use [Composer](http://getcomposer.org/):
```
composer require czproject/runner
```
`CzProject\Runner` requires PHP 5.6.0 or later.
## Usage
``` php
use CzProject\Runner\Runner;
$runner = new Runner('/path/to/working/directory');
$result = $runner->run('ls');
$result = $runner->run(array('git', 'remote', 'add', $remoteName, $remoteUrl));
$result = $runner->run(array(
'git',
'clone',
$cloneUrl,
'--bare' => TRUE,
'--branch' => 'master',
));
$result->isOk();
$result->getCommand();
$result->getCode();
$result->getOutput();
```
------------------------------
License: [New BSD License](license.md)
Author: Jan Pecha, https://www.janpecha.cz/