Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phragment/storage/PhragmentFragment.php
<?php | <?php | ||||
final class PhragmentFragment extends PhragmentDAO | final class PhragmentFragment extends PhragmentDAO | ||||
implements PhabricatorPolicyInterface { | implements PhabricatorPolicyInterface { | ||||
protected $path; | protected $path; | ||||
protected $depth; | protected $depth; | ||||
protected $latestVersionPHID; | protected $latestVersionPHID; | ||||
protected $viewPolicy; | protected $viewPolicy; | ||||
protected $editPolicy; | protected $editPolicy; | ||||
private $latestVersion = self::ATTACHABLE; | private $latestVersion = self::ATTACHABLE; | ||||
public function getConfiguration() { | public function getConfiguration() { | ||||
return array( | return array( | ||||
self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
self::CONFIG_COLUMN_SCHEMA => array( | |||||
'path' => 'text255', | |||||
'depth' => 'uint32', | |||||
'latestVersionPHID' => 'phid?', | |||||
), | |||||
self::CONFIG_KEY_SCHEMA => array( | |||||
'key_path' => array( | |||||
'columns' => array('path'), | |||||
'unique' => true, | |||||
), | |||||
), | |||||
) + parent::getConfiguration(); | ) + parent::getConfiguration(); | ||||
} | } | ||||
public function generatePHID() { | public function generatePHID() { | ||||
return PhabricatorPHID::generateNewPHID( | return PhabricatorPHID::generateNewPHID( | ||||
PhragmentFragmentPHIDType::TYPECONST); | PhragmentFragmentPHIDType::TYPECONST); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 316 Lines • Show Last 20 Lines |