Page Menu
Home
WMGMC Issues
搜索
Configure Global Search
登录
Files
F16079
PhabricatorFileExternalRequest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
订阅
标记用于日后
授予令牌
Size
1 KB
Referenced Files
None
订阅者
None
PhabricatorFileExternalRequest.php
View Options
<?php
final
class
PhabricatorFileExternalRequest
extends
PhabricatorFileDAO
implements
PhabricatorDestructibleInterface
{
protected
$uri
;
protected
$uriIndex
;
protected
$ttl
;
protected
$filePHID
;
protected
$isSuccessful
;
protected
$responseMessage
;
protected
function
getConfiguration
()
{
return
array
(
self
::
CONFIG_COLUMN_SCHEMA
=>
array
(
'uri'
=>
'text'
,
'uriIndex'
=>
'bytes12'
,
'ttl'
=>
'epoch'
,
'filePHID'
=>
'phid?'
,
'isSuccessful'
=>
'bool'
,
'responseMessage'
=>
'text?'
,
),
self
::
CONFIG_KEY_SCHEMA
=>
array
(
'key_uriindex'
=>
array
(
'columns'
=>
array
(
'uriIndex'
),
'unique'
=>
true
,
),
'key_ttl'
=>
array
(
'columns'
=>
array
(
'ttl'
),
),
'key_file'
=>
array
(
'columns'
=>
array
(
'filePHID'
),
),
),
)
+
parent
::
getConfiguration
();
}
public
function
save
()
{
$hash
=
PhabricatorHash
::
digestForIndex
(
$this
->
getURI
());
$this
->
setURIIndex
(
$hash
);
return
parent
::
save
();
}
/* -( PhabricatorDestructibleInterface )----------------------------------- */
public
function
destroyObjectPermanently
(
PhabricatorDestructionEngine
$engine
)
{
$file_phid
=
$this
->
getFilePHID
();
if
(
$file_phid
)
{
$file
=
id
(
new
PhabricatorFileQuery
())
->
setViewer
(
$engine
->
getViewer
())
->
withPHIDs
(
array
(
$file_phid
))
->
executeOne
();
if
(
$file
)
{
$engine
->
destroyObject
(
$file
);
}
}
$this
->
delete
();
}
}
File Metadata
详情
附加的
Mime Type
text/x-php
Expires
9月 11 Thu, 1:42 PM (1 d, 5 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5550
默认替代文本
PhabricatorFileExternalRequest.php (1 KB)
Attached To
Mode
rP phorge
附加的
Detach File
Event Timeline
Log In to Comment