3 final class PhabricatorPhurlURLQuery
4 extends PhabricatorCursorPagedPolicyAwareQuery
{
13 public function newResultObject() {
14 return new PhabricatorPhurlURL();
17 public function withIDs(array $ids) {
22 public function withPHIDs(array $phids) {
23 $this->phids
= $phids;
27 public function withNames(array $names) {
28 $this->names
= $names;
32 public function withNameNgrams($ngrams) {
33 return $this->withNgramsConstraint(
34 id(new PhabricatorPhurlURLNameNgrams()),
38 public function withLongURLs(array $long_urls) {
39 $this->longURLs
= $long_urls;
43 public function withAliases(array $aliases) {
44 $this->aliases
= $aliases;
48 public function withAuthorPHIDs(array $author_phids) {
49 $this->authorPHIDs
= $author_phids;
53 protected function loadPage() {
54 return $this->loadStandardPage($this->newResultObject());
57 protected function buildWhereClauseParts(AphrontDatabaseConnection
$conn) {
58 $where = parent
::buildWhereClauseParts($conn);
60 if ($this->ids
!== null) {
67 if ($this->phids
!== null) {
74 if ($this->authorPHIDs
!== null) {
77 'url.authorPHID IN (%Ls)',
81 if ($this->names
!== null) {
88 if ($this->longURLs
!== null) {
91 'url.longURL IN (%Ls)',
95 if ($this->aliases
!== null) {
105 protected function getPrimaryTableAlias() {
109 public function getQueryApplicationClass() {
110 return 'PhabricatorPhurlApplication';