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

42 lines
903 B
PHP
Raw Normal View History

<?php
final class PhabricatorConfigServerSchema
extends PhabricatorConfigStorageSchema {
private $databases = array();
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();
}
public function compareToSimilarSchema(
PhabricatorConfigStorageSchema $expect) {
return array();
}
public function newEmptyClone() {
$clone = clone $this;
$clone->databases = array();
return $clone;
}
}