Changeset View
Changeset View
Standalone View
Standalone View
src/applications/owners/storage/PhabricatorOwnersPath.php
| <?php | <?php | ||||
| final class PhabricatorOwnersPath extends PhabricatorOwnersDAO { | final class PhabricatorOwnersPath extends PhabricatorOwnersDAO { | ||||
| protected $packageID; | protected $packageID; | ||||
| protected $repositoryPHID; | protected $repositoryPHID; | ||||
| protected $pathIndex; | |||||
| protected $path; | protected $path; | ||||
| protected $excluded; | protected $excluded; | ||||
| private $fragments; | private $fragments; | ||||
| private $fragmentCount; | private $fragmentCount; | ||||
| protected function getConfiguration() { | protected function getConfiguration() { | ||||
| return array( | return array( | ||||
| self::CONFIG_TIMESTAMPS => false, | self::CONFIG_TIMESTAMPS => false, | ||||
| self::CONFIG_COLUMN_SCHEMA => array( | self::CONFIG_COLUMN_SCHEMA => array( | ||||
| 'path' => 'text255', | 'path' => 'text255', | ||||
| 'pathIndex' => 'bytes12', | |||||
| 'excluded' => 'bool', | 'excluded' => 'bool', | ||||
| ), | ), | ||||
| self::CONFIG_KEY_SCHEMA => array( | self::CONFIG_KEY_SCHEMA => array( | ||||
| 'packageID' => array( | 'packageID' => array( | ||||
| 'columns' => array('packageID'), | 'columns' => array('packageID'), | ||||
| ), | ), | ||||
| ), | ), | ||||
| ) + parent::getConfiguration(); | ) + parent::getConfiguration(); | ||||
| } | } | ||||
| public static function newFromRef(array $ref) { | public static function newFromRef(array $ref) { | ||||
| $path = new PhabricatorOwnersPath(); | $path = new PhabricatorOwnersPath(); | ||||
| $path->repositoryPHID = $ref['repositoryPHID']; | $path->repositoryPHID = $ref['repositoryPHID']; | ||||
| $path->path = $ref['path']; | |||||
| $raw_path = $ref['path']; | |||||
| $path->pathIndex = PhabricatorHash::digestForIndex($raw_path); | |||||
| $path->path = $raw_path; | |||||
| $path->excluded = $ref['excluded']; | $path->excluded = $ref['excluded']; | ||||
| return $path; | return $path; | ||||
| } | } | ||||
| public function getRef() { | public function getRef() { | ||||
| return array( | return array( | ||||
| 'repositoryPHID' => $this->getRepositoryPHID(), | 'repositoryPHID' => $this->getRepositoryPHID(), | ||||
| 'path' => $this->getPath(), | 'path' => $this->getPath(), | ||||
| 'excluded' => (int)$this->getExcluded(), | 'excluded' => (int)$this->getExcluded(), | ||||
| ▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines | |||||