Differential D15493 Diff 37345 src/applications/repository/storage/PhabricatorRepositoryGitLFSRef.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/storage/PhabricatorRepositoryGitLFSRef.php
| <?php | <?php | ||||
| final class PhabricatorRepositoryGitLFSRef | final class PhabricatorRepositoryGitLFSRef | ||||
| extends PhabricatorRepositoryDAO | extends PhabricatorRepositoryDAO | ||||
| implements PhabricatorPolicyInterface { | implements | ||||
| PhabricatorPolicyInterface, | |||||
| PhabricatorDestructibleInterface { | |||||
| protected $repositoryPHID; | protected $repositoryPHID; | ||||
| protected $objectHash; | protected $objectHash; | ||||
| protected $byteSize; | protected $byteSize; | ||||
| protected $authorPHID; | protected $authorPHID; | ||||
| protected $filePHID; | protected $filePHID; | ||||
| protected function getConfiguration() { | protected function getConfiguration() { | ||||
| Show All 29 Lines | public function hasAutomaticCapability($capability, PhabricatorUser $viewer) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| public function describeAutomaticCapability($capability) { | public function describeAutomaticCapability($capability) { | ||||
| return null; | return null; | ||||
| } | } | ||||
| /* -( PhabricatorDestructibleInterface )----------------------------------- */ | |||||
| public function destroyObjectPermanently( | |||||
| PhabricatorDestructionEngine $engine) { | |||||
| $file_phid = $this->getFilePHID(); | |||||
| $file = id(new PhabricatorFileQuery()) | |||||
| ->setViewer($engine->getViewer()) | |||||
| ->withPHIDs(array($file_phid)) | |||||
| ->executeOne(); | |||||
| if ($file) { | |||||
| $engine->destroyObject($file); | |||||
| } | |||||
| $this->delete(); | |||||
| } | |||||
| } | } | ||||