Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F107540035
ReleephObjectHandleLoader.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
Tue, Apr 8, 21:44
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Apr 10, 21:44 (2 d)
Engine
blob
Format
Raw Data
Handle
25435589
Attached To
rPH Phabricator
ReleephObjectHandleLoader.php
View Options
<?php
final
class
ReleephObjectHandleLoader
extends
ObjectHandleLoader
{
public
function
loadHandles
(
array
$phids
)
{
$types
=
array
();
foreach
(
$phids
as
$phid
)
{
$type
=
phid_get_type
(
$phid
);
$types
[
$type
][]
=
$phid
;
}
$handles
=
array
();
foreach
(
$types
as
$type
=>
$phids
)
{
switch
(
$type
)
{
case
ReleephPHIDConstants
::
PHID_TYPE_REBR
:
$object
=
new
ReleephBranch
();
$branches
=
$object
->
loadAllWhere
(
'phid IN (%Ls)'
,
$phids
);
$branches
=
mpull
(
$branches
,
null
,
'getPHID'
);
foreach
(
$phids
as
$phid
)
{
$branch
=
$branches
[
$phid
];
$handle
=
new
PhabricatorObjectHandle
();
$handle
->
setPHID
(
$phid
);
$handle
->
setType
(
$type
);
$handle
->
setURI
(
$branch
->
getURI
());
$handle
->
setName
(
$branch
->
getBasename
());
$handle
->
setFullName
(
$branch
->
getName
());
$handle
->
setComplete
(
true
);
$handles
[
$phid
]
=
$handle
;
}
break
;
default
:
throw
new
Exception
(
'unknown type '
.
$type
);
}
}
return
$handles
;
}
}
Event Timeline
Log In to Comment