Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2890073
PhutilConsoleBlock.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
878 B
Referenced Files
None
Subscribers
None
PhutilConsoleBlock.php
View Options
<?php
final
class
PhutilConsoleBlock
extends
PhutilConsoleView
{
private
$items
=
array
(
)
;
public
function
addParagraph
(
$item
)
{
$this
->
items
[
]
=
array
(
'type'
=>
'paragraph'
,
'item'
=>
$item
,
)
;
return
$this
;
}
public
function
addList
(
PhutilConsoleList
$list
)
{
$this
->
items
[
]
=
array
(
'type'
=>
'list'
,
'item'
=>
$list
,
)
;
return
$this
;
}
protected
function
drawView
(
)
{
$output
=
array
(
)
;
foreach
(
$this
->
items
as
$spec
)
{
$type
=
$spec
[
'type'
]
;
$item
=
$spec
[
'item'
]
;
switch
(
$type
)
{
case
'paragraph'
:
$item
=
array
(
tsprintf
(
'%s'
,
$item
)
->
applyWrap
(
)
,
"\n"
,
)
;
break
;
case
'list'
:
$item
=
$item
;
break
;
}
$output
[
]
=
$item
;
}
return
$this
->
drawLines
(
$output
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 13:02 (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1115179
Default Alt Text
PhutilConsoleBlock.php (878 B)
Attached To
Mode
rARC Arcanist
Attached
Detach File
Event Timeline
Log In to Comment