jnjxp / xcmd
Simple external command runner
0.1.0
2016-10-23 16:56 UTC
Requires
- aura/payload: ^3.0
This package is auto-updated.
Last update: 2024-10-26 09:13:40 UTC
README
Simple external command runner.
Basically just a proc_open
wrapper;
Installation
composer require jnjxp/xcmd
Usage
use Jnjxp\Xcmd\ExternalCommand; $cmd = new ExternalCommand('elinks -dump -dump-color-mode 1'); $payload = $cmd($response->getBody()); // write input to stdin if ($payload->isError()) { foreach ($payload->getMessages() as $error) { echo $error . "\n"; } exit($payload->getStatus()) } echo $payload;