[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhrequentPushConduitAPIMethod extends PhrequentConduitAPIMethod { 4 5 public function getAPIMethodName() { 6 return 'phrequent.push'; 7 } 8 9 public function getMethodDescription() { 10 return pht( 11 'Start tracking time on an object by '. 12 'pushing it on the tracking stack.'); 13 } 14 15 public function getMethodStatus() { 16 return self::METHOD_STATUS_UNSTABLE; 17 } 18 19 public function defineParamTypes() { 20 return array( 21 'objectPHID' => 'required phid', 22 'startTime' => 'int', 23 ); 24 } 25 26 public function defineReturnType() { 27 return 'phid'; 28 } 29 30 public function defineErrorTypes() { 31 return array( 32 ); 33 } 34 35 protected function execute(ConduitAPIRequest $request) { 36 $user = $request->getUser(); 37 $object_phid = $request->getValue('objectPHID'); 38 $timestamp = $request->getValue('startTime'); 39 if ($timestamp === null) { 40 $timestamp = time(); 41 } 42 43 $editor = new PhrequentTrackingEditor(); 44 return $editor->startTracking($user, $object_phid, $timestamp); 45 } 46 47 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |