Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93615512
PhabricatorProjectPHIDResolver.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
Sat, Nov 30, 04:35
Size
724 B
Mime Type
text/x-php
Expires
Mon, Dec 2, 04:35 (2 d)
Engine
blob
Format
Raw Data
Handle
22674535
Attached To
rPH Phabricator
PhabricatorProjectPHIDResolver.php
View Options
<?php
final
class
PhabricatorProjectPHIDResolver
extends
PhabricatorPHIDResolver
{
protected
function
getResolutionMap
(
array
$names
)
{
// This is a little awkward but we want to pick up the normalization
// rules from the PHIDType. This flow could perhaps be made cleaner.
foreach
(
$names
as
$key
=>
$name
)
{
$names
[
$key
]
=
'#'
.
$name
;
}
$query
=
id
(
new
PhabricatorObjectQuery
())
->
setViewer
(
$this
->
getViewer
());
$projects
=
id
(
new
PhabricatorProjectProjectPHIDType
())
->
loadNamedObjects
(
$query
,
$names
);
$results
=
array
();
foreach
(
$projects
as
$hashtag
=>
$project
)
{
$results
[
substr
(
$hashtag
,
1
)]
=
$project
->
getPHID
();
}
return
$results
;
}
}
Event Timeline
Log In to Comment