php-censor/src/PHPCensor/Plugin.php

55 lines
1 KiB
PHP
Raw Normal View History

2013-05-03 17:02:53 +02:00
<?php
2013-05-16 03:16:56 +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-05-03 17:02:53 +02:00
2016-07-19 20:28:11 +02:00
namespace PHPCensor;
2013-05-03 17:02:53 +02:00
use PHPCensor\Model\Build;
2016-07-11 18:00:04 +02:00
2013-05-16 03:16:56 +02:00
/**
2016-07-11 18:00:04 +02:00
* PHPCI Plugin class - Used by all build plugins.
*
* @author Dan Cryer <dan@block8.co.uk>
2013-05-16 03:16:56 +02:00
*/
2016-07-11 18:00:04 +02:00
abstract class Plugin
2013-05-03 17:02:53 +02:00
{
2016-07-11 18:00:04 +02:00
/**
* @var \PHPCensor\Builder
2016-07-11 18:00:04 +02:00
*/
protected $phpci;
/**
* @var \PHPCensor\Model\Build
2016-07-11 18:00:04 +02:00
*/
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();
}