Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diviner/storage/DivinerLiveSymbol.php
| <?php | <?php | ||||
| final class DivinerLiveSymbol extends DivinerDAO | final class DivinerLiveSymbol extends DivinerDAO | ||||
| implements | implements | ||||
| PhabricatorPolicyInterface, | PhabricatorPolicyInterface, | ||||
| PhabricatorMarkupInterface, | PhabricatorMarkupInterface, | ||||
| PhabricatorDestructibleInterface { | PhabricatorDestructibleInterface { | ||||
| protected $bookPHID; | protected $bookPHID; | ||||
| protected $repositoryPHID; | |||||
| protected $context; | protected $context; | ||||
| protected $type; | protected $type; | ||||
| protected $name; | protected $name; | ||||
| protected $atomIndex; | protected $atomIndex; | ||||
| protected $graphHash; | protected $graphHash; | ||||
| protected $identityHash; | protected $identityHash; | ||||
| protected $nodeHash; | protected $nodeHash; | ||||
| protected $title; | protected $title; | ||||
| protected $titleSlugHash; | protected $titleSlugHash; | ||||
| protected $groupName; | protected $groupName; | ||||
| protected $summary; | protected $summary; | ||||
| protected $isDocumentable = 0; | protected $isDocumentable = 0; | ||||
| private $book = self::ATTACHABLE; | private $book = self::ATTACHABLE; | ||||
| private $repository = self::ATTACHABLE; | |||||
| private $atom = self::ATTACHABLE; | private $atom = self::ATTACHABLE; | ||||
| private $extends = self::ATTACHABLE; | private $extends = self::ATTACHABLE; | ||||
| private $children = self::ATTACHABLE; | private $children = self::ATTACHABLE; | ||||
| protected function getConfiguration() { | protected function getConfiguration() { | ||||
| return array( | return array( | ||||
| self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
| self::CONFIG_TIMESTAMPS => false, | self::CONFIG_TIMESTAMPS => false, | ||||
| self::CONFIG_COLUMN_SCHEMA => array( | self::CONFIG_COLUMN_SCHEMA => array( | ||||
| 'context' => 'text255?', | 'context' => 'text255?', | ||||
| 'type' => 'text32', | 'type' => 'text32', | ||||
| 'name' => 'text255', | 'name' => 'text255', | ||||
| 'atomIndex' => 'uint32', | 'atomIndex' => 'uint32', | ||||
| 'identityHash' => 'bytes12', | 'identityHash' => 'bytes12', | ||||
| 'graphHash' => 'text64?', | 'graphHash' => 'text64?', | ||||
| 'title' => 'text?', | 'title' => 'text?', | ||||
| 'titleSlugHash' => 'bytes12?', | 'titleSlugHash' => 'bytes12?', | ||||
| 'groupName' => 'text255?', | 'groupName' => 'text255?', | ||||
| 'summary' => 'text?', | 'summary' => 'text?', | ||||
| 'isDocumentable' => 'bool', | 'isDocumentable' => 'bool', | ||||
| 'nodeHash' => 'text64?', | 'nodeHash' => 'text64?', | ||||
| 'repositoryPHID' => 'phid?', | |||||
| ), | ), | ||||
| self::CONFIG_KEY_SCHEMA => array( | self::CONFIG_KEY_SCHEMA => array( | ||||
| 'key_phid' => null, | 'key_phid' => null, | ||||
| 'identityHash' => array( | 'identityHash' => array( | ||||
| 'columns' => array('identityHash'), | 'columns' => array('identityHash'), | ||||
| 'unique' => true, | 'unique' => true, | ||||
| ), | ), | ||||
| 'phid' => array( | 'phid' => array( | ||||
| Show All 35 Lines | public function getBook() { | ||||
| return $this->assertAttached($this->book); | return $this->assertAttached($this->book); | ||||
| } | } | ||||
| public function attachBook(DivinerLiveBook $book) { | public function attachBook(DivinerLiveBook $book) { | ||||
| $this->book = $book; | $this->book = $book; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getRepository() { | |||||
| return $this->assertAttached($this->repository); | |||||
| } | |||||
| public function attachRepository(PhabricatorRepository $repository = null) { | |||||
| $this->repository = $repository; | |||||
| return $this; | |||||
| } | |||||
| public function getAtom() { | public function getAtom() { | ||||
| return $this->assertAttached($this->atom); | return $this->assertAttached($this->atom); | ||||
| } | } | ||||
| public function attachAtom(DivinerLiveAtom $atom = null) { | public function attachAtom(DivinerLiveAtom $atom = null) { | ||||
| if ($atom === null) { | if ($atom === null) { | ||||
| $this->atom = null; | $this->atom = null; | ||||
| } else { | } else { | ||||
| ▲ Show 20 Lines • Show All 167 Lines • Show Last 20 Lines | |||||