Mercurial > hg > isophonics-drupal-site
annotate vendor/psy/psysh/src/Psy/Command/ExitCommand.php @ 12:7a779792577d
Update Drupal core to v8.4.5 (via Composer)
author | Chris Cannam |
---|---|
date | Fri, 23 Feb 2018 15:52:07 +0000 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 /* |
Chris@0 | 4 * This file is part of Psy Shell. |
Chris@0 | 5 * |
Chris@0 | 6 * (c) 2012-2017 Justin Hileman |
Chris@0 | 7 * |
Chris@0 | 8 * For the full copyright and license information, please view the LICENSE |
Chris@0 | 9 * file that was distributed with this source code. |
Chris@0 | 10 */ |
Chris@0 | 11 |
Chris@0 | 12 namespace Psy\Command; |
Chris@0 | 13 |
Chris@0 | 14 use Psy\Exception\BreakException; |
Chris@0 | 15 use Symfony\Component\Console\Input\InputInterface; |
Chris@0 | 16 use Symfony\Component\Console\Output\OutputInterface; |
Chris@0 | 17 |
Chris@0 | 18 /** |
Chris@0 | 19 * Exit the Psy Shell. |
Chris@0 | 20 * |
Chris@0 | 21 * Just what it says on the tin. |
Chris@0 | 22 */ |
Chris@0 | 23 class ExitCommand extends Command |
Chris@0 | 24 { |
Chris@0 | 25 /** |
Chris@0 | 26 * {@inheritdoc} |
Chris@0 | 27 */ |
Chris@0 | 28 protected function configure() |
Chris@0 | 29 { |
Chris@0 | 30 $this |
Chris@0 | 31 ->setName('exit') |
Chris@0 | 32 ->setAliases(array('quit', 'q')) |
Chris@0 | 33 ->setDefinition(array()) |
Chris@0 | 34 ->setDescription('End the current session and return to caller.') |
Chris@0 | 35 ->setHelp( |
Chris@0 | 36 <<<'HELP' |
Chris@0 | 37 End the current session and return to caller. |
Chris@0 | 38 |
Chris@0 | 39 e.g. |
Chris@0 | 40 <return>>>> exit</return> |
Chris@0 | 41 HELP |
Chris@0 | 42 ); |
Chris@0 | 43 } |
Chris@0 | 44 |
Chris@0 | 45 /** |
Chris@0 | 46 * {@inheritdoc} |
Chris@0 | 47 */ |
Chris@0 | 48 protected function execute(InputInterface $input, OutputInterface $output) |
Chris@0 | 49 { |
Chris@0 | 50 throw new BreakException('Goodbye.'); |
Chris@0 | 51 } |
Chris@0 | 52 } |