Wallogit.com
2017 © Pedro Peláez
MadPiper lets you create piped cli commands with a fluent interface
MadPiper lets you create piped cli commands with a fluent interface., (*1)
MadPiper works with PHP 5.4, 5.5., 5.6 and 7.0., (*3)
The package can be installed via composer:, (*4)
composer require broeser/madpiper, (*5)
Check your safe mode settings and restrictions, in case you want to execute commands generated with MadPiper., (*6)
You can use MadPiper like this:, (*7)
<?php
$madPiperCommand = new MadPiper\Command();
exec($madPiperCommand
->ps('u')
->grep('COMMAND')
);
Which will execute this (not very useful) command:, (*8)
ps u|grep COMMAND, (*9)
Note that neither ps() nor grep() are predefined methods, you can use almost any command you can imagine with as many arguments as you want., (*10)
<?php
$madPiperCommand = new MadPiper\Command();
exec($madPiperCommand
->ls('-ls', 'R*')
->…
);
MadPiper does not execute, ist just returns the command as string. That means, that it should be easy to use MadPiper in your own project and with almost any framework., (*11)
MadPiper currently does not escape arguments., (*12)
Yes, please!, (*13)
See CONTRIBUTING.md for details and/or open an issue with your questions., (*14)
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms., (*15)
A pun on the pipe-character | and the fact, that this project is slightly mad., (*16)