Refactored plugins

This commit is contained in:
Dmitry Khomutov 2016-07-11 22:00:04 +06:00
commit 16a5add859
45 changed files with 404 additions and 1224 deletions

View file

@ -9,11 +9,46 @@
namespace PHPCensor;
use PHPCI\Model\Build;
/**
* PHPCI Plugin Interface - Used by all build plugins.
* PHPCI Plugin class - Used by all build plugins.
*
* @author Dan Cryer <dan@block8.co.uk>
*/
interface Plugin
abstract class Plugin
{
public function execute();
/**
* @var \PHPCI\Builder
*/
protected $phpci;
/**
* @var \PHPCI\Model\Build
*/
protected $build;
/**
* @var array
*/
protected $options;
/**
* @param Builder $phpci
* @param Build $build
* @param array $options
*/
public function __construct(Builder $phpci, Build $build, array $options = [])
{
$this->phpci = $phpci;
$this->build = $build;
$this->options = $options;
$this->phpci->logDebug('Plugin options: ' . json_encode($options));
}
/**
* @return boolean
*/
abstract public function execute();
}