Differential D20317 Diff 48471 src/applications/transactions/query/PhabricatorApplicationTransactionQuery.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/query/PhabricatorApplicationTransactionQuery.php
| <?php | <?php | ||||
| abstract class PhabricatorApplicationTransactionQuery | abstract class PhabricatorApplicationTransactionQuery | ||||
| extends PhabricatorCursorPagedPolicyAwareQuery { | extends PhabricatorCursorPagedPolicyAwareQuery { | ||||
| private $ids; | |||||
| private $phids; | private $phids; | ||||
| private $objectPHIDs; | private $objectPHIDs; | ||||
| private $authorPHIDs; | private $authorPHIDs; | ||||
| private $transactionTypes; | private $transactionTypes; | ||||
| private $withComments; | private $withComments; | ||||
| private $needComments = true; | private $needComments = true; | ||||
| private $needHandles = true; | private $needHandles = true; | ||||
| Show All 16 Lines | foreach ($queries as $query) { | ||||
| } | } | ||||
| } | } | ||||
| return null; | return null; | ||||
| } | } | ||||
| abstract public function getTemplateApplicationTransaction(); | abstract public function getTemplateApplicationTransaction(); | ||||
| public function withIDs(array $ids) { | |||||
| $this->ids = $ids; | |||||
| return $this; | |||||
| } | |||||
| public function withPHIDs(array $phids) { | public function withPHIDs(array $phids) { | ||||
| $this->phids = $phids; | $this->phids = $phids; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function withObjectPHIDs(array $object_phids) { | public function withObjectPHIDs(array $object_phids) { | ||||
| $this->objectPHIDs = $object_phids; | $this->objectPHIDs = $object_phids; | ||||
| return $this; | return $this; | ||||
| ▲ Show 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | protected function willFilterPage(array $xactions) { | ||||
| } | } | ||||
| return $xactions; | return $xactions; | ||||
| } | } | ||||
| protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { | protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { | ||||
| $where = parent::buildWhereClauseParts($conn); | $where = parent::buildWhereClauseParts($conn); | ||||
| if ($this->ids !== null) { | |||||
| $where[] = qsprintf( | |||||
| $conn, | |||||
| 'x.id IN (%Ld)', | |||||
| $this->ids); | |||||
| } | |||||
| if ($this->phids !== null) { | if ($this->phids !== null) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn, | $conn, | ||||
| 'x.phid IN (%Ls)', | 'x.phid IN (%Ls)', | ||||
| $this->phids); | $this->phids); | ||||
| } | } | ||||
| if ($this->objectPHIDs !== null) { | if ($this->objectPHIDs !== null) { | ||||
| ▲ Show 20 Lines • Show All 85 Lines • Show Last 20 Lines | |||||