Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98633610
DiffusionLowLevelQuery.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, Jan 15, 02:35
Size
898 B
Mime Type
text/x-php
Expires
Fri, Jan 17, 02:35 (2 d)
Engine
blob
Format
Raw Data
Handle
23578512
Attached To
rPH Phabricator
DiffusionLowLevelQuery.php
View Options
<?php
abstract
class
DiffusionLowLevelQuery
extends
Phobject
{
private
$repository
;
abstract
protected
function
executeQuery
();
public
function
setRepository
(
PhabricatorRepository
$repository
)
{
$this
->
repository
=
$repository
;
return
$this
;
}
public
function
getRepository
()
{
return
$this
->
repository
;
}
public
function
execute
()
{
if
(!
$this
->
getRepository
())
{
throw
new
PhutilInvalidStateException
(
'setRepository'
);
}
return
$this
->
executeQuery
();
}
protected
function
filterRefsByType
(
array
$refs
,
array
$types
)
{
$type_map
=
array_fuse
(
$types
);
foreach
(
$refs
as
$name
=>
$ref_list
)
{
foreach
(
$ref_list
as
$key
=>
$ref
)
{
if
(
empty
(
$type_map
[
$ref
[
'type'
]]))
{
unset
(
$refs
[
$name
][
$key
]);
}
}
if
(!
$refs
[
$name
])
{
unset
(
$refs
[
$name
]);
}
}
return
$refs
;
}
}
Event Timeline
Log In to Comment