3 final class PhabricatorRepositoryGitLFSRef
4 extends PhabricatorRepositoryDAO
6 PhabricatorPolicyInterface
,
7 PhabricatorDestructibleInterface
{
9 protected $repositoryPHID;
10 protected $objectHash;
12 protected $authorPHID;
15 protected function getConfiguration() {
17 self
::CONFIG_COLUMN_SCHEMA
=> array(
18 'objectHash' => 'bytes64',
19 'byteSize' => 'uint64',
21 self
::CONFIG_KEY_SCHEMA
=> array(
23 'columns' => array('repositoryPHID', 'objectHash'),
27 ) + parent
::getConfiguration();
31 /* -( PhabricatorPolicyInterface )----------------------------------------- */
34 public function getCapabilities() {
36 PhabricatorPolicyCapability
::CAN_VIEW
,
40 public function getPolicy($capability) {
41 return PhabricatorPolicies
::getMostOpenPolicy();
44 public function hasAutomaticCapability($capability, PhabricatorUser
$viewer) {
49 /* -( PhabricatorDestructibleInterface )----------------------------------- */
52 public function destroyObjectPermanently(
53 PhabricatorDestructionEngine
$engine) {
55 $file_phid = $this->getFilePHID();
57 $file = id(new PhabricatorFileQuery())
58 ->setViewer($engine->getViewer())
59 ->withPHIDs(array($file_phid))
62 $engine->destroyObject($file);