Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96493066
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
Fri, Dec 27, 06:35
Size
898 B
Mime Type
text/x-php
Expires
Sun, Dec 29, 06:35 (1 d, 8 h)
Engine
blob
Format
Raw Data
Handle
23193599
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