Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/schema/PhabricatorConfigColumnSchema.php
<?php | <?php | ||||
final class PhabricatorConfigColumnSchema extends Phobject { | final class PhabricatorConfigColumnSchema | ||||
extends PhabricatorConfigStorageSchema { | |||||
private $name; | |||||
private $characterSet; | private $characterSet; | ||||
private $collation; | private $collation; | ||||
private $columnType; | private $columnType; | ||||
public function setColumnType($column_type) { | public function setColumnType($column_type) { | ||||
$this->columnType = $column_type; | $this->columnType = $column_type; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getColumnType() { | public function getColumnType() { | ||||
return $this->columnType; | return $this->columnType; | ||||
} | } | ||||
protected function getSubschemata() { | |||||
return array(); | |||||
} | |||||
public function setCollation($collation) { | public function setCollation($collation) { | ||||
$this->collation = $collation; | $this->collation = $collation; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getCollation() { | public function getCollation() { | ||||
return $this->collation; | return $this->collation; | ||||
} | } | ||||
public function setCharacterSet($character_set) { | public function setCharacterSet($character_set) { | ||||
$this->characterSet = $character_set; | $this->characterSet = $character_set; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getCharacterSet() { | public function getCharacterSet() { | ||||
return $this->characterSet; | return $this->characterSet; | ||||
} | } | ||||
public function setName($name) { | public function compareToSimilarSchema( | ||||
$this->name = $name; | PhabricatorConfigStorageSchema $expect) { | ||||
return $this; | |||||
$issues = array(); | |||||
if ($this->getCharacterSet() != $expect->getCharacterSet()) { | |||||
$issues[] = self::ISSUE_CHARSET; | |||||
} | |||||
if ($this->getCollation() != $expect->getCollation()) { | |||||
$issues[] = self::ISSUE_COLLATION; | |||||
} | |||||
if ($this->getColumnType() != $expect->getColumnType()) { | |||||
$issues[] = self::ISSUE_COLUMNTYPE; | |||||
} | |||||
return $issues; | |||||
} | } | ||||
public function getName() { | public function newEmptyClone() { | ||||
return $this->name; | $clone = clone $this; | ||||
return $clone; | |||||
} | } | ||||
} | } |