2013-12-12 15:15:44 +01:00
|
|
|
<?php
|
2014-05-12 18:26:17 +02:00
|
|
|
/**
|
|
|
|
* PHPCI - Continuous Integration for PHP
|
|
|
|
*
|
|
|
|
* @copyright Copyright 2014, Block 8 Limited.
|
|
|
|
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
|
|
|
|
* @link https://www.phptesting.org/
|
|
|
|
*/
|
2013-12-12 15:15:44 +01:00
|
|
|
|
|
|
|
namespace PHPCI\Helper;
|
|
|
|
|
2014-05-09 14:09:27 +02:00
|
|
|
interface CommandExecutor
|
2013-12-12 15:15:44 +01:00
|
|
|
{
|
|
|
|
/**
|
2014-05-09 14:09:27 +02:00
|
|
|
* Executes shell commands. Accepts multiple arguments the first
|
|
|
|
* is the template and everything else is inserted in. c.f. sprintf
|
2013-12-12 15:15:44 +01:00
|
|
|
* @return bool Indicates success
|
|
|
|
*/
|
2014-05-09 14:09:27 +02:00
|
|
|
public function executeCommand();
|
2013-12-12 15:15:44 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the output from the last command run.
|
|
|
|
*/
|
2014-05-09 14:09:27 +02:00
|
|
|
public function getLastOutput();
|
2013-12-12 17:17:11 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Find a binary required by a plugin.
|
2014-05-09 10:21:53 +02:00
|
|
|
* @param string $binary
|
2015-04-14 12:17:52 +02:00
|
|
|
* @param bool $quiet Returns null instead of throwing an execption.
|
|
|
|
*
|
2013-12-12 17:17:11 +01:00
|
|
|
* @return null|string
|
2015-04-14 12:17:52 +02:00
|
|
|
*
|
|
|
|
* @throws \Exception when no binary has been found and $quiet is false.
|
2013-12-12 17:17:11 +01:00
|
|
|
*/
|
2015-04-14 12:17:52 +02:00
|
|
|
public function findBinary($binary, $quiet = false);
|
2015-02-23 15:40:20 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the buildPath property.
|
|
|
|
* @param string $path
|
|
|
|
*/
|
|
|
|
public function setBuildPath($path);
|
2013-12-12 15:15:44 +01:00
|
|
|
}
|