TYPO3  7.6
command_4.php
Go to the documentation of this file.
1 <?php
2 
6 
7 //Ensure has single blank line after any text and a title
8 return function (InputInterface $input, OutputInterface $output) {
9  $output = new SymfonyStyle($input, $output);
10 
11  $output->write('Lorem ipsum dolor sit amet');
12  $output->title('First title');
13 
14  $output->writeln('Lorem ipsum dolor sit amet');
15  $output->title('Second title');
16 
17  $output->write('Lorem ipsum dolor sit amet');
18  $output->write('');
19  $output->title('Third title');
20 
21  //Ensure edge case by appending empty strings to history:
22  $output->write('Lorem ipsum dolor sit amet');
23  $output->write(array('', '', ''));
24  $output->title('Fourth title');
25 
26  //Ensure have manual control over number of blank lines:
27  $output->writeln('Lorem ipsum dolor sit amet');
28  $output->writeln(array('', '')); //Should append an extra blank line
29  $output->title('Fifth title');
30 
31  $output->writeln('Lorem ipsum dolor sit amet');
32  $output->newLine(2); //Should append an extra blank line
33  $output->title('Fifth title');
34 };