Path: blob/master/src/applications/calendar/query/PhabricatorCalendarExportQuery.php
12256 views
<?php12final class PhabricatorCalendarExportQuery3extends PhabricatorCursorPagedPolicyAwareQuery {45private $ids;6private $phids;7private $authorPHIDs;8private $secretKeys;9private $isDisabled;1011public function withIDs(array $ids) {12$this->ids = $ids;13return $this;14}1516public function withPHIDs(array $phids) {17$this->phids = $phids;18return $this;19}2021public function withAuthorPHIDs(array $phids) {22$this->authorPHIDs = $phids;23return $this;24}2526public function withIsDisabled($is_disabled) {27$this->isDisabled = $is_disabled;28return $this;29}3031public function withSecretKeys(array $keys) {32$this->secretKeys = $keys;33return $this;34}3536public function newResultObject() {37return new PhabricatorCalendarExport();38}3940protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) {41$where = parent::buildWhereClauseParts($conn);4243if ($this->ids !== null) {44$where[] = qsprintf(45$conn,46'export.id IN (%Ld)',47$this->ids);48}4950if ($this->phids !== null) {51$where[] = qsprintf(52$conn,53'export.phid IN (%Ls)',54$this->phids);55}5657if ($this->authorPHIDs !== null) {58$where[] = qsprintf(59$conn,60'export.authorPHID IN (%Ls)',61$this->authorPHIDs);62}6364if ($this->isDisabled !== null) {65$where[] = qsprintf(66$conn,67'export.isDisabled = %d',68(int)$this->isDisabled);69}7071if ($this->secretKeys !== null) {72$where[] = qsprintf(73$conn,74'export.secretKey IN (%Ls)',75$this->secretKeys);76}7778return $where;79}8081protected function getPrimaryTableAlias() {82return 'export';83}8485public function getQueryApplicationClass() {86return 'PhabricatorCalendarApplication';87}8889}909192