Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F107929849
ConduitAPI_phrequent_push_Method.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
Sat, Apr 12, 01:56
Size
978 B
Mime Type
text/x-php
Expires
Mon, Apr 14, 01:56 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25486979
Attached To
rPH Phabricator
ConduitAPI_phrequent_push_Method.php
View Options
<?php
final
class
ConduitAPI_phrequent_push_Method
extends
ConduitAPI_phrequent_Method
{
public
function
getMethodDescription
()
{
return
pht
(
'Start tracking time on an object by '
.
'pushing it on the tracking stack.'
);
}
public
function
getMethodStatus
()
{
return
self
::
METHOD_STATUS_UNSTABLE
;
}
public
function
defineParamTypes
()
{
return
array
(
'objectPHID'
=>
'required phid'
,
'startTime'
=>
'int'
);
}
public
function
defineReturnType
()
{
return
'phid'
;
}
public
function
defineErrorTypes
()
{
return
array
(
);
}
protected
function
execute
(
ConduitAPIRequest
$request
)
{
$user
=
$request
->
getUser
();
$object_phid
=
$request
->
getValue
(
'objectPHID'
);
$timestamp
=
$request
->
getValue
(
'startTime'
);
if
(
$timestamp
===
null
)
{
$timestamp
=
time
();
}
$editor
=
new
PhrequentTrackingEditor
();
return
$editor
->
startTracking
(
$user
,
$object_phid
,
$timestamp
);
}
}
Event Timeline
Log In to Comment