Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setStyleDefinition example
public
function
testStyle
(
)
{
$style
=
new
TableStyle
(
)
;
$style
->
setHorizontalBorderChars
(
'.'
)
->
setVerticalBorderChars
(
'.'
)
->
setDefaultCrossingChar
(
'.'
)
;
Table::
setStyleDefinition
(
'dotfull',
$style
)
;
$table
=
new
Table
(
$output
=
$this
->
getOutputStream
(
)
)
;
$table
->
setHeaders
(
[
'Foo'
]
)
->
setRows
(
[
[
'Bar'
]
]
)
->
setStyle
(
'dotfull'
)
;
$table
->
render
(
)
;
$expected
=
<<<'TABLE' ....... . Foo . ....... . Bar . .......