forked from php-censor/php-censor
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPlugin.php
More file actions
76 lines (65 loc) · 1.35 KB
/
Copy pathPlugin.php
File metadata and controls
76 lines (65 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
namespace PHPCensor;
use PHPCensor\Model\Build;
/**
* PHPCI Plugin class - Used by all build plugins.
*
* @author Dan Cryer <dan@block8.co.uk>
*/
abstract class Plugin
{
const STATUS_PENDING = 0;
const STATUS_RUNNING = 1;
const STATUS_SUCCESS = 2;
const STATUS_FAILED = 3;
const STATUS_FAILED_ALLOWED = 4;
/**
* @var \PHPCensor\Builder
*/
protected $builder;
/**
* @var \PHPCensor\Model\Build
*/
protected $build;
/**
* @var array
*/
protected $options;
/**
* @param Builder $builder
* @param Build $build
* @param array $options
*/
public function __construct(Builder $builder, Build $build, array $options = [])
{
$this->builder = $builder;
$this->build = $build;
$this->options = $options;
$this->builder->logDebug('Plugin options: ' . json_encode($options));
}
/**
* @return Build
*/
public function getBuild()
{
return $this->build;
}
/**
* @return Builder
*/
public function getBuilder()
{
return $this->builder;
}
/**
* @return boolean
*/
abstract public function execute();
/**
* @return string
*/
public static function pluginName()
{
return '';
}
}