Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F7112482
ArcanistBrowseObjectNameURIHardpointQuery.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
ArcanistBrowseObjectNameURIHardpointQuery.php
View Options
<?php
final
class
ArcanistBrowseObjectNameURIHardpointQuery
extends
ArcanistBrowseURIHardpointQuery
{
const
BROWSETYPE
=
'object'
;
public
function
loadHardpoint
(
array
$refs
,
$hardpoint
)
{
$refs
=
$this
->
getRefsWithSupportedTypes
(
$refs
);
if
(!
$refs
)
{
yield
$this
->
yieldMap
(
array
());
}
$name_map
=
array
();
$token_set
=
array
();
foreach
(
$refs
as
$key
=>
$ref
)
{
$token
=
$ref
->
getToken
();
if
(!
strlen
(
$token
))
{
continue
;
}
$name_map
[
$key
]
=
$token
;
$token_set
[
$token
]
=
$token
;
}
if
(!
$token_set
)
{
yield
$this
->
yieldMap
(
array
());
}
$objects
=
(
yield
$this
->
yieldConduit
(
'phid.lookup'
,
array
(
'names'
=>
$token_set
,
)));
$result
=
array
();
foreach
(
$name_map
as
$ref_key
=>
$token
)
{
$object
=
idx
(
$objects
,
$token
);
if
(!
$object
)
{
continue
;
}
$uri
=
idx
(
$object
,
'uri'
);
if
(!
strlen
(
$uri
))
{
continue
;
}
$result
[
$ref_key
][]
=
$this
->
newBrowseURIRef
()
->
setURI
(
$object
[
'uri'
]);
}
yield
$this
->
yieldMap
(
$result
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Jul 3, 17:59 (5 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
779435
Default Alt Text
ArcanistBrowseObjectNameURIHardpointQuery.php (1 KB)
Attached To
Mode
R118 Arcanist - fork
Attached
Detach File
Event Timeline
Log In to Comment