php-censor/src/PHPCensor/Helper/CommandExecutorInterface.php

40 lines
930 B
PHP
Raw Normal View History

<?php
2016-07-19 20:28:11 +02:00
namespace PHPCensor\Helper;
2017-01-13 16:35:41 +01:00
interface CommandExecutorInterface
{
/**
* Executes shell commands. Accepts multiple arguments the first
* is the template and everything else is inserted in. c.f. sprintf
2016-05-09 08:20:26 +02:00
*
* @param array $args
*
* @return bool Indicates success
*/
2016-05-09 08:20:26 +02:00
public function executeCommand($args = []);
/**
* Returns the output from the last command run.
*/
public function getLastOutput();
/**
* Find a binary required by a plugin.
2016-05-09 08:20:26 +02:00
*
2014-05-09 10:21:53 +02:00
* @param string $binary
* @param bool $quiet Returns null instead of throwing an execption.
*
* @return null|string
*
* @throws \Exception when no binary has been found and $quiet is false.
*/
public function findBinary($binary, $quiet = false);
/**
* Set the buildPath property.
* @param string $path
*/
public function setBuildPath($path);
}