@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3final class PhabricatorConfigServerSchema
4 extends PhabricatorConfigStorageSchema {
5
6 private $ref;
7 private $databases = array();
8
9 public function setRef(PhabricatorDatabaseRef $ref) {
10 $this->ref = $ref;
11 return $this;
12 }
13
14 public function getRef() {
15 return $this->ref;
16 }
17
18 public function addDatabase(PhabricatorConfigDatabaseSchema $database) {
19 $key = $database->getName();
20 if (isset($this->databases[$key])) {
21 throw new Exception(
22 pht('Trying to add duplicate database "%s"!', $key));
23 }
24 $this->databases[$key] = $database;
25 return $this;
26 }
27
28 public function getDatabases() {
29 return $this->databases;
30 }
31
32 public function getDatabase($key) {
33 return idx($this->getDatabases(), $key);
34 }
35
36 protected function getSubschemata() {
37 return $this->getDatabases();
38 }
39
40 protected function compareToSimilarSchema(
41 PhabricatorConfigStorageSchema $expect) {
42 return array();
43 }
44
45 public function newEmptyClone() {
46 $clone = clone $this;
47 $clone->databases = array();
48 return $clone;
49 }
50
51}