1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-15 19:32:40 +01:00
phorge-phorge/src/applications/config/schema/PhabricatorConfigServerSchema.php

52 lines
1.1 KiB
PHP
Raw Normal View History

<?php
final class PhabricatorConfigServerSchema
extends PhabricatorConfigStorageSchema {
private $ref;
private $databases = array();
public function setRef(PhabricatorDatabaseRef $ref) {
$this->ref = $ref;
return $this;
}
public function getRef() {
return $this->ref;
}
public function addDatabase(PhabricatorConfigDatabaseSchema $database) {
$key = $database->getName();
if (isset($this->databases[$key])) {
throw new Exception(
pht('Trying to add duplicate database "%s"!', $key));
}
$this->databases[$key] = $database;
return $this;
}
public function getDatabases() {
return $this->databases;
}
public function getDatabase($key) {
return idx($this->getDatabases(), $key);
}
protected function getSubschemata() {
return $this->getDatabases();
}
protected function compareToSimilarSchema(
PhabricatorConfigStorageSchema $expect) {
return array();
}
public function newEmptyClone() {
$clone = clone $this;
$clone->databases = array();
return $clone;
}
}