Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F104525548
PhabricatorXHPASTViewStreamController.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
Mon, Mar 10, 04:19
Size
801 B
Mime Type
text/x-php
Expires
Wed, Mar 12, 04:19 (2 d)
Engine
blob
Format
Raw Data
Handle
24689722
Attached To
rPH Phabricator
PhabricatorXHPASTViewStreamController.php
View Options
<?php
final
class
PhabricatorXHPASTViewStreamController
extends
PhabricatorXHPASTViewPanelController
{
public
function
processRequest
()
{
$storage
=
$this
->
getStorageTree
();
$input
=
$storage
->
getInput
();
$stdout
=
$storage
->
getStdout
();
$tree
=
XHPASTTree
::
newFromDataAndResolvedExecFuture
(
$input
,
array
(
0
,
$stdout
,
''
));
$tokens
=
array
();
foreach
(
$tree
->
getRawTokenStream
()
as
$id
=>
$token
)
{
$seq
=
$id
;
$name
=
$token
->
getTypeName
();
$title
=
"Token {$seq}: {$name}"
;
$tokens
[]
=
phutil_tag
(
'span'
,
array
(
'title'
=>
$title
,
'class'
=>
'token'
,
),
$token
->
getValue
());
}
return
$this
->
buildXHPASTViewPanelResponse
(
phutil_implode_html
(
''
,
$tokens
));
}
}
Event Timeline
Log In to Comment