This repository has been archived by the owner on Jul 13, 2021. It is now read-only.
/
Phing.php
130 lines (103 loc) · 2.65 KB
/
Phing.php
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?php
namespace BsbPhingService\Options;
use Zend\Stdlib\AbstractOptions;
use Zend\Stdlib\Parameters;
class Phing extends AbstractOptions
{
protected $buildFile = null;
protected $logger = null;
protected $logFile = null;
protected $propertyFile = null;
/**
*
* @var Parameters
*/
protected $properties = null;
protected $inputHandler = null;
protected $longTargets = null;
protected $list = null;
protected $find = null;
public function __construct(array $options = null)
{
$this->properties = new Parameters(array());
parent::__construct($options);
}
public function setBuildFile($path)
{
if (!is_file($path)) {
throw new \RuntimeException(sprintf("Path '%s' does not exists '%s'", 'buildFile', $path));
}
if (pathinfo($path, PATHINFO_EXTENSION) != 'xml') {
throw new \InvalidArgumentException(sprintf("File '%s' is not an xml file '%s'", 'buildFile', $path));
}
$this->buildFile = (string) realpath($path);
}
public function getBuildFile()
{
return $this->buildFile;
}
public function setLogger($logger)
{
$this->logger = (string) $logger;
}
public function getLogger()
{
return $this->logger;
}
public function setLogFile($logFile)
{
$this->logFile = (string) $logFile;
}
public function getLogFile()
{
return $this->logFile;
}
public function setPropertyFile($file)
{
$this->propertyFile = (string) $file;
}
public function getPropertyFile()
{
return $this->propertyFile;
}
public function setInputHandler($className)
{
$this->inputHandler = (string) $className;
}
public function getInputHandler()
{
return $this->inputHandler;
}
public function setProperties(array $properties)
{
$this->properties->fromArray($properties);
}
public function getProperties()
{
return $this->properties->toArray();
}
public function setLongTargets($targets)
{
$this->longTargets = filter_var($targets, FILTER_VALIDATE_BOOLEAN);
}
public function getLongTargets()
{
return (bool) $this->longTargets;
}
public function setList($value)
{
$this->list = filter_var($value, FILTER_VALIDATE_BOOLEAN);
}
public function getList()
{
return (bool) $this->list;
}
public function setFind($value)
{
$this->find = $value;
}
public function getFind()
{
return $this->find;
}
}