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
|
2014-07-04 11:02:27 +02:00
|
|
|
* @param string $buildPath the current build path
|
2013-12-12 17:17:11 +01:00
|
|
|
* @return null|string
|
|
|
|
*/
|
2014-07-04 11:02:27 +02:00
|
|
|
public function findBinary($binary, $buildPath = null);
|
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
|
|
|
}
|