Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F461077
PhabricatorProjectPHIDResolver.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
724 B
Referenced Files
None
Subscribers
None
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
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 5, 4:28 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
72216
Default Alt Text
PhabricatorProjectPHIDResolver.php (724 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment