Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F476958
FileDeletionWorker.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
757 B
Referenced Files
None
Subscribers
None
FileDeletionWorker.php
View Options
<?php
final
class
FileDeletionWorker
extends
PhabricatorWorker
{
private
function
loadFile
()
{
$phid
=
idx
(
$this
->
getTaskData
(),
'objectPHID'
);
if
(!
$phid
)
{
throw
new
PhabricatorWorkerPermanentFailureException
(
pht
(
'No "%s" in task data.'
,
'objectPHID'
));
}
$file
=
id
(
new
PhabricatorFileQuery
())
->
setViewer
(
PhabricatorUser
::
getOmnipotentUser
())
->
withPHIDs
(
array
(
$phid
))
->
executeOne
();
if
(!
$file
)
{
throw
new
PhabricatorWorkerPermanentFailureException
(
pht
(
'File "%s" does not exist.'
,
$phid
));
}
return
$file
;
}
protected
function
doWork
()
{
$file
=
$this
->
loadFile
();
$engine
=
new
PhabricatorDestructionEngine
();
$engine
->
destroyObject
(
$file
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, May 7, 6:15 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
86736
Default Alt Text
FileDeletionWorker.php (757 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment