Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97225299
PhabricatorJenkinsJobQuery.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Jan 3, 14:35
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Jan 5, 14:35 (2 d)
Engine
blob
Format
Raw Data
Handle
23358678
Attached To
rPH Phabricator
PhabricatorJenkinsJobQuery.php
View Options
<?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
Log In to Comment