comparison vendor/psy/psysh/src/Command/ExitCommand.php @ 0:c75dbcec494b

Initial commit from drush-created site
author Chris Cannam
date Thu, 05 Jul 2018 14:24:15 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c75dbcec494b
1 <?php
2
3 /*
4 * This file is part of Psy Shell.
5 *
6 * (c) 2012-2018 Justin Hileman
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Psy\Command;
13
14 use Psy\Exception\BreakException;
15 use Symfony\Component\Console\Input\InputInterface;
16 use Symfony\Component\Console\Output\OutputInterface;
17
18 /**
19 * Exit the Psy Shell.
20 *
21 * Just what it says on the tin.
22 */
23 class ExitCommand extends Command
24 {
25 /**
26 * {@inheritdoc}
27 */
28 protected function configure()
29 {
30 $this
31 ->setName('exit')
32 ->setAliases(['quit', 'q'])
33 ->setDefinition([])
34 ->setDescription('End the current session and return to caller.')
35 ->setHelp(
36 <<<'HELP'
37 End the current session and return to caller.
38
39 e.g.
40 <return>>>> exit</return>
41 HELP
42 );
43 }
44
45 /**
46 * {@inheritdoc}
47 */
48 protected function execute(InputInterface $input, OutputInterface $output)
49 {
50 throw new BreakException('Goodbye');
51 }
52 }