Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96653334
PhrequentPushConduitAPIMethod.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
Sun, Dec 29, 12:42
Size
982 B
Mime Type
text/x-php
Expires
Tue, Dec 31, 12:42 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23207115
Attached To
rPH Phabricator
PhrequentPushConduitAPIMethod.php
View Options
<?php
final
class
PhrequentPushConduitAPIMethod
extends
PhrequentConduitAPIMethod
{
public
function
getAPIMethodName
()
{
return
'phrequent.push'
;
}
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
;
}
protected
function
defineParamTypes
()
{
return
array
(
'objectPHID'
=>
'required phid'
,
'startTime'
=>
'int'
,
);
}
protected
function
defineReturnType
()
{
return
'phid'
;
}
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