Yaffs site version 1.1
[yaffs-website] / vendor / symfony / console / Tests / Fixtures / Style / SymfonyStyle / command / command_8.php
1 <?php
2
3 use Symfony\Component\Console\Input\InputInterface;
4 use Symfony\Component\Console\Output\OutputInterface;
5 use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength;
6 use Symfony\Component\Console\Helper\TableCell;
7
8 //Ensure formatting tables when using multiple headers with TableCell
9 return function (InputInterface $input, OutputInterface $output) {
10     $headers = array(
11         array(new TableCell('Main table title', array('colspan' => 3))),
12         array('ISBN', 'Title', 'Author'),
13     );
14
15     $rows = array(
16         array(
17             '978-0521567817',
18             'De Monarchia',
19             new TableCell("Dante Alighieri\nspans multiple rows", array('rowspan' => 2)),
20         ),
21         array('978-0804169127', 'Divine Comedy'),
22     );
23
24     $output = new SymfonyStyleWithForcedLineLength($input, $output);
25     $output->table($headers, $rows);
26 };