This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$this->io->error('Lorem ipsum dolor sit amet'); | |
// or with array: | |
$this->io->error([ | |
'Lorem ipsum dolor sit amet', | |
'Consectetur adipiscing elit', | |
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$this->io->warning('Lorem ipsum dolor sit amet'); | |
// or with array: | |
$this->io->warning([ | |
'Lorem ipsum dolor sit amet', | |
'Consectetur adipiscing elit', | |
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$this->io->success('Lorem ipsum dolor sit amet'); | |
// or with array: | |
$this->io->success([ | |
'Lorem ipsum dolor sit amet', | |
'Consectetur adipiscing elit', | |
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$this->io->choice('Select the queue to analyze', ['queue1', 'queue2', 'queue3']); | |
// default value: | |
$this->io->choice('Select the queue to analyze', ['queue1', 'queue2', 'queue3'], 'queue1'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$this->io->confirm('Restart the web server?'); | |
// default value: | |
$this->io->confirm('Restart the web server?', true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$this->io->ask('What is your name?'); | |
// default value: | |
$this->io->ask('Where are you from?', 'United States'); | |
// validation: | |
$this->io->ask('Number of workers to start', 1, function ($number) { | |
if (!is_numeric($number)) { | |
throw new \RuntimeException('You must type a number.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// use simple strings for short caution message | |
$this->io->caution('Lorem ipsum dolor sit amet'); | |
// consider using arrays when displaying long caution messages | |
$this->io->caution([ | |
'Lorem ipsum dolor sit amet', | |
'Consectetur adipiscing elit', | |
'Aenean sit amet arcu vitae sem faucibus porta', | |
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// use simple strings for short notes | |
$this->io->note('Lorem ipsum dolor sit amet'); | |
// consider using arrays when displaying long notes | |
$this->io->note([ | |
'Lorem ipsum dolor sit amet', | |
'Consectetur adipiscing elit', | |
'Aenean sit amet arcu vitae sem faucibus porta', | |
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// outputs three consecutive blank lines | |
$this->io->text('Line 02-01'); | |
$this->io->newLine(3); | |
$this->io->text('Line 02-02'); |
NewerOlder