forked from phacility/phabricator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPhabricatorConfigProxySource.php
54 lines (42 loc) · 1.1 KB
/
PhabricatorConfigProxySource.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
<?php
/**
* Configuration source which proxies some other configuration source.
*/
abstract class PhabricatorConfigProxySource
extends PhabricatorConfigSource {
private $source;
final protected function getSource() {
if (!$this->source) {
throw new Exception(pht('No configuration source set!'));
}
return $this->source;
}
final protected function setSource(PhabricatorConfigSource $source) {
$this->source = $source;
return $this;
}
public function getAllKeys() {
return $this->getSource()->getAllKeys();
}
public function getKeys(array $keys) {
return $this->getSource()->getKeys($keys);
}
public function canWrite() {
return $this->getSource()->canWrite();
}
public function setKeys(array $keys) {
$this->getSource()->setKeys($keys);
return $this;
}
public function deleteKeys(array $keys) {
$this->getSource()->deleteKeys($keys);
return $this;
}
public function setName($name) {
$this->getSource()->setName($name);
return $this;
}
public function getName() {
return $this->getSource()->getName();
}
}