Path: blob/master/src/applications/packages/query/PhabricatorPackagesPublisherQuery.php
12242 views
<?php12final class PhabricatorPackagesPublisherQuery3extends PhabricatorPackagesQuery {45private $ids;6private $phids;7private $publisherKeys;89public function withIDs(array $ids) {10$this->ids = $ids;11return $this;12}1314public function withPHIDs(array $phids) {15$this->phids = $phids;16return $this;17}1819public function withPublisherKeys(array $keys) {20$this->publisherKeys = $keys;21return $this;22}2324public function withNameNgrams($ngrams) {25return $this->withNgramsConstraint(26new PhabricatorPackagesPublisherNameNgrams(),27$ngrams);28}2930public function newResultObject() {31return new PhabricatorPackagesPublisher();32}3334protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) {35$where = parent::buildWhereClauseParts($conn);3637if ($this->ids !== null) {38$where[] = qsprintf(39$conn,40'u.id IN (%Ld)',41$this->ids);42}4344if ($this->phids !== null) {45$where[] = qsprintf(46$conn,47'u.phid IN (%Ls)',48$this->phids);49}5051if ($this->publisherKeys !== null) {52$where[] = qsprintf(53$conn,54'u.publisherKey IN (%Ls)',55$this->publisherKeys);56}5758return $where;59}6061protected function getPrimaryTableAlias() {62return 'u';63}6465}666768