[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorConfigDatabaseSchema 4 extends PhabricatorConfigStorageSchema { 5 6 private $characterSet; 7 private $collation; 8 private $tables = array(); 9 10 public function addTable(PhabricatorConfigTableSchema $table) { 11 $key = $table->getName(); 12 if (isset($this->tables[$key])) { 13 throw new Exception( 14 pht('Trying to add duplicate table "%s"!', $key)); 15 } 16 $this->tables[$key] = $table; 17 return $this; 18 } 19 20 public function getTables() { 21 return $this->tables; 22 } 23 24 public function getTable($key) { 25 return idx($this->tables, $key); 26 } 27 28 protected function getSubschemata() { 29 return $this->getTables(); 30 } 31 32 public function compareToSimilarSchema( 33 PhabricatorConfigStorageSchema $expect) { 34 35 $issues = array(); 36 if ($this->getCharacterSet() != $expect->getCharacterSet()) { 37 $issues[] = self::ISSUE_CHARSET; 38 } 39 40 if ($this->getCollation() != $expect->getCollation()) { 41 $issues[] = self::ISSUE_COLLATION; 42 } 43 44 return $issues; 45 } 46 47 public function newEmptyClone() { 48 $clone = clone $this; 49 $clone->tables = array(); 50 return $clone; 51 } 52 53 public function setCollation($collation) { 54 $this->collation = $collation; 55 return $this; 56 } 57 58 public function getCollation() { 59 return $this->collation; 60 } 61 62 public function setCharacterSet($character_set) { 63 $this->characterSet = $character_set; 64 return $this; 65 } 66 67 public function getCharacterSet() { 68 return $this->characterSet; 69 } 70 71 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |