Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2894066
DiffusionLowLevelQuery.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
898 B
Referenced Files
None
Subscribers
None
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
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 19:19 (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1127905
Default Alt Text
DiffusionLowLevelQuery.php (898 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment