Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F81405558
PhabricatorFactLastUpdatedEngine.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
Thu, Sep 5, 21:19
Size
778 B
Mime Type
text/x-php
Expires
Sat, Sep 7, 21:19 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20563716
Attached To
rPH Phabricator
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
;
}
}
Event Timeline
Log In to Comment