[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorConduitLogQuery 4 extends PhabricatorCursorPagedPolicyAwareQuery { 5 6 private $methods; 7 8 public function withMethods(array $methods) { 9 $this->methods = $methods; 10 return $this; 11 } 12 13 public function loadPage() { 14 $table = new PhabricatorConduitMethodCallLog(); 15 $conn_r = $table->establishConnection('r'); 16 17 $data = queryfx_all( 18 $conn_r, 19 'SELECT * FROM %T %Q %Q %Q', 20 $table->getTableName(), 21 $this->buildWhereClause($conn_r), 22 $this->buildOrderClause($conn_r), 23 $this->buildLimitClause($conn_r)); 24 25 return $table->loadAllFromArray($data);; 26 } 27 28 private function buildWhereClause(AphrontDatabaseConnection $conn_r) { 29 $where = array(); 30 31 if ($this->methods) { 32 $where[] = qsprintf( 33 $conn_r, 34 'method IN (%Ls)', 35 $this->methods); 36 } 37 38 $where[] = $this->buildPagingClause($conn_r); 39 return $this->formatWhereClause($where); 40 } 41 42 public function getQueryApplicationClass() { 43 return 'PhabricatorConduitApplication'; 44 } 45 46 }
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 |