Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97236007
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
Fri, Jan 3, 16:41
Size
801 B
Mime Type
text/x-php
Expires
Sun, Jan 5, 16:41 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23361414
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