Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/infrastructure/env/PhabricatorConfigProxySource.php
12241 views
1
<?php
2
3
/**
4
* Configuration source which proxies some other configuration source.
5
*/
6
abstract class PhabricatorConfigProxySource
7
extends PhabricatorConfigSource {
8
9
private $source;
10
11
final protected function getSource() {
12
if (!$this->source) {
13
throw new Exception(pht('No configuration source set!'));
14
}
15
return $this->source;
16
}
17
18
final protected function setSource(PhabricatorConfigSource $source) {
19
$this->source = $source;
20
return $this;
21
}
22
23
public function getAllKeys() {
24
return $this->getSource()->getAllKeys();
25
}
26
27
public function getKeys(array $keys) {
28
return $this->getSource()->getKeys($keys);
29
}
30
31
public function canWrite() {
32
return $this->getSource()->canWrite();
33
}
34
35
public function setKeys(array $keys) {
36
$this->getSource()->setKeys($keys);
37
return $this;
38
}
39
40
public function deleteKeys(array $keys) {
41
$this->getSource()->deleteKeys($keys);
42
return $this;
43
}
44
45
public function setName($name) {
46
$this->getSource()->setName($name);
47
return $this;
48
}
49
50
public function getName() {
51
return $this->getSource()->getName();
52
}
53
54
}
55
56