Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93290743
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
Wed, Nov 27, 16:18
Size
1 KB
Mime Type
text/x-php
Expires
Fri, Nov 29, 16:18 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22609948
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