Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F950055
PhabricatorFactLastUpdatedEngine.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
778 B
Referenced Files
None
Subscribers
None
PhabricatorFactLastUpdatedEngine.php
View Options
<?php
/**
* Engine that records the time facts were last updated.
*/
final
class
PhabricatorFactLastUpdatedEngine
extends
PhabricatorFactEngine
{
public
function
getFactSpecs
(
array
$fact_types
)
{
$results
=
array
();
foreach
(
$fact_types
as
$type
)
{
if
(
$type
==
'updated'
)
{
$results
[]
=
id
(
new
PhabricatorFactSimpleSpec
(
$type
))
->
setName
(
pht
(
'Facts Last Updated'
))
->
setUnit
(
PhabricatorFactSimpleSpec
::
UNIT_EPOCH
);
}
}
return
$results
;
}
public
function
shouldComputeAggregateFacts
()
{
return
true
;
}
public
function
computeAggregateFacts
()
{
$facts
=
array
();
$facts
[]
=
id
(
new
PhabricatorFactAggregate
())
->
setFactType
(
'updated'
)
->
setValueX
(
time
());
return
$facts
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Jun 17, 1:55 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
224051
Default Alt Text
PhabricatorFactLastUpdatedEngine.php (778 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment