Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F551922
PhrequentPopConduitAPIMethod.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhrequentPopConduitAPIMethod.php
View Options
<?php
final
class
PhrequentPopConduitAPIMethod
extends
PhrequentConduitAPIMethod
{
public
function
getAPIMethodName
()
{
return
'phrequent.pop'
;
}
public
function
getMethodDescription
()
{
return
pht
(
'Stop tracking time on an object by popping it from the stack.'
);
}
public
function
getMethodStatus
()
{
return
self
::
METHOD_STATUS_UNSTABLE
;
}
protected
function
defineParamTypes
()
{
return
array
(
'objectPHID'
=>
'phid'
,
'stopTime'
=>
'int'
,
'note'
=>
'string'
,
);
}
protected
function
defineReturnType
()
{
return
'phid'
;
}
protected
function
execute
(
ConduitAPIRequest
$request
)
{
$user
=
$request
->
getUser
();
$object_phid
=
$request
->
getValue
(
'objectPHID'
);
$timestamp
=
$request
->
getValue
(
'stopTime'
);
$note
=
$request
->
getValue
(
'note'
);
if
(
$timestamp
===
null
)
{
$timestamp
=
time
();
}
$editor
=
new
PhrequentTrackingEditor
();
if
(!
$object_phid
)
{
return
$editor
->
stopTrackingTop
(
$user
,
$timestamp
,
$note
);
}
else
{
return
$editor
->
stopTracking
(
$user
,
$object_phid
,
$timestamp
,
$note
);
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 4:00 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
97944
Default Alt Text
PhrequentPopConduitAPIMethod.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment