Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F971131
PhabricatorXHProfProfileController.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorXHProfProfileController.php
View Options
<?php
final
class
PhabricatorXHProfProfileController
extends
PhabricatorXHProfController
{
private
$phid
;
public
function
willProcessRequest
(
array
$data
)
{
$this
->
phid
=
$data
[
'phid'
];
}
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$file
=
id
(
new
PhabricatorFileQuery
())
->
setViewer
(
$request
->
getUser
())
->
withPHIDs
(
array
(
$this
->
phid
))
->
executeOne
();
if
(!
$file
)
{
return
new
Aphront404Response
();
}
$data
=
$file
->
loadFileData
();
$data
=
@
json_decode
(
$data
,
true
);
if
(!
$data
)
{
throw
new
Exception
(
'Failed to unserialize XHProf profile!'
);
}
$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
);
return
$this
->
buildStandardPageResponse
(
$view
,
array
(
'title'
=>
'Profile'
,
'frame'
=>
$is_framed
,
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Jun 18, 5:38 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
226080
Default Alt Text
PhabricatorXHProfProfileController.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment