Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F80257339
PhabricatorRepositoryGitLFSRef.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Aug 30, 18:13
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Sep 1, 18:13 (2 d)
Engine
blob
Format
Raw Data
Handle
20301311
Attached To
rPH Phabricator
PhabricatorRepositoryGitLFSRef.php
View Options
<?php
final
class
PhabricatorRepositoryGitLFSRef
extends
PhabricatorRepositoryDAO
implements
PhabricatorPolicyInterface
,
PhabricatorDestructibleInterface
{
protected
$repositoryPHID
;
protected
$objectHash
;
protected
$byteSize
;
protected
$authorPHID
;
protected
$filePHID
;
protected
function
getConfiguration
()
{
return
array
(
self
::
CONFIG_COLUMN_SCHEMA
=>
array
(
'objectHash'
=>
'bytes64'
,
'byteSize'
=>
'uint64'
,
),
self
::
CONFIG_KEY_SCHEMA
=>
array
(
'key_hash'
=>
array
(
'columns'
=>
array
(
'repositoryPHID'
,
'objectHash'
),
'unique'
=>
true
,
),
),
)
+
parent
::
getConfiguration
();
}
/* -( PhabricatorPolicyInterface )----------------------------------------- */
public
function
getCapabilities
()
{
return
array
(
PhabricatorPolicyCapability
::
CAN_VIEW
,
);
}
public
function
getPolicy
(
$capability
)
{
return
PhabricatorPolicies
::
getMostOpenPolicy
();
}
public
function
hasAutomaticCapability
(
$capability
,
PhabricatorUser
$viewer
)
{
return
false
;
}
public
function
describeAutomaticCapability
(
$capability
)
{
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
();
}
}
Event Timeline
Log In to Comment