Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F34157985
PhabricatorXHProfProfileController.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
1 KB
Subscribers
None
PhabricatorXHProfProfileController.php
View Options
<?php
final
class
PhabricatorXHProfProfileController
extends
PhabricatorXHProfController
{
public
function
shouldAllowPublic
()
{
return
true
;
}
public
function
handleRequest
(
AphrontRequest
$request
)
{
$phid
=
$request
->
getURIData
(
'phid'
);
$file
=
id
(
new
PhabricatorFileQuery
())
->
setViewer
(
$request
->
getUser
())
->
withPHIDs
(
array
(
$phid
))
->
executeOne
();
if
(!
$file
)
{
return
new
Aphront404Response
();
}
$data
=
$file
->
loadFileData
();
try
{
$data
=
phutil_json_decode
(
$data
);
}
catch
(
PhutilJSONParserException
$ex
)
{
throw
new
PhutilProxyException
(
pht
(
'Failed to unserialize XHProf profile!'
),
$ex
);
}
$symbol
=
$request
->
getStr
(
'symbol'
);
$is_framed
=
$request
->
getBool
(
'frame'
);
if
(
$symbol
)
{
$view
=
new
PhabricatorXHProfProfileSymbolView
();
$view
->
setSymbol
(
$symbol
);
}
else
{
$view
=
new
PhabricatorXHProfProfileTopLevelView
();
$view
->
setFile
(
$file
);
$view
->
setLimit
(
100
);
}
$view
->
setBaseURI
(
$request
->
getRequestURI
()->
getPath
());
$view
->
setIsFramed
(
$is_framed
);
$view
->
setProfileData
(
$data
);
$crumbs
=
$this
->
buildApplicationCrumbs
();
$crumbs
->
addTextCrumb
(
pht
(
'%s Profile'
,
$symbol
));
$title
=
pht
(
'Profile'
);
return
$this
->
newPage
()
->
setTitle
(
$title
)
->
setCrumbs
(
$crumbs
)
->
setFrameable
(
true
)
->
setShowChrome
(
false
)
->
setDisableConsole
(
true
)
->
appendChild
(
$view
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Dec 11, 7:53 AM (1 h, 25 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
6e/0f/27820f65ca514e4ace5addabf330
Attached To
rPHAB Phabricator
Event Timeline
Log In to Comment