Page MenuHomec4science

PhabricatorJenkinsJobQuery.php
No OneTemporary

File Metadata

Created
Fri, Jun 28, 04:59

PhabricatorJenkinsJobQuery.php

<?php
final class PhabricatorJenkinsJobQuery
extends PhabricatorCursorPagedPolicyAwareQuery {
private $ids;
private $repositories;
private $projects;
public function withIDs(array $ids) {
$this->ids = $ids;
return $this;
}
public function withRepositories(array $phids) {
$this->repositories = $phids;
return $this;
}
public function withProjects(array $phids) {
$this->projects = $phids;
return $this;
}
public function newResultObject() {
return new PhabricatorJenkinsJob();
}
protected function loadPage() {
return $this->loadStandardPage($this->newResultObject());
}
public function getQueryApplicationClass() {
return 'PhabricatorC4scienceApplication';
}
protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) {
$where = parent::buildWhereClauseParts($conn);
if ($this->ids !== null) {
$where[] = qsprintf(
$conn,
'id IN (%Ls)',
$this->ids);
}
if ($this->repositories !== null) {
$where[] = qsprintf(
$conn,
'repository IN (%Ls)',
$this->repositories);
}
if ($this->projects !== null) {
foreach ($this->projects as $p) {
$where[] = qsprintf(
$conn,
'projectPHID LIKE (%~)',
$p);
}
}
return $where;
}
}

Event Timeline