[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorTokenReceiverQuery 4 extends PhabricatorCursorPagedPolicyAwareQuery { 5 6 private $tokenCounts; 7 8 protected function loadPage() { 9 $table = new PhabricatorTokenCount(); 10 $conn_r = $table->establishConnection('r'); 11 12 $rows = queryfx_all( 13 $conn_r, 14 'SELECT objectPHID, tokenCount FROM %T ORDER BY tokenCount DESC', 15 $table->getTableName()); 16 17 $this->tokenCounts = ipull($rows, 'tokenCount', 'objectPHID'); 18 return ipull($rows, 'objectPHID'); 19 } 20 21 public function willFilterPage(array $phids) { 22 $objects = id(new PhabricatorObjectQuery()) 23 ->setViewer($this->getViewer()) 24 ->withPHIDs($phids) 25 ->execute(); 26 27 // Reorder the objects in the input order. 28 $objects = array_select_keys($objects, $phids); 29 30 return $objects; 31 } 32 33 public function getTokenCounts() { 34 return $this->tokenCounts; 35 } 36 37 public function getQueryApplicationClass() { 38 return 'PhabricatorTokensApplication'; 39 } 40 41 }
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 |