1+ <?php
2+ /**
3+ * UserFrosting (http://www.userfrosting.com)
4+ *
5+ * @link https://github.com/userfrosting/UserFrosting
6+ * @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
7+ */
8+ namespace UserFrosting \System \Bakery \Command ;
9+
10+ use Symfony \Component \Console \Input \InputInterface ;
11+ use Symfony \Component \Console \Output \OutputInterface ;
12+ use UserFrosting \System \Bakery \BaseCommand ;
13+
14+ /**
15+ * Setup wizard CLI Tools.
16+ * Helper command to setup .env file
17+ *
18+ * @author Alex Weissman (https://alexanderweissman.com)
19+ */
20+ class SetupCommand extends BaseCommand
21+ {
22+ /**
23+ * {@inheritDoc}
24+ */
25+ protected function configure ()
26+ {
27+ $ this ->setName ("setup " )
28+ ->setDescription ("UserFrosting Configuration Wizard " )
29+ ->setHelp ("This command combine the <info>setup:env</info>, <info>setup:db</info> and <info>setup:smtp</info> commands. " );
30+ }
31+
32+ /**
33+ * {@inheritDoc}
34+ */
35+ protected function execute (InputInterface $ input , OutputInterface $ output )
36+ {
37+ $ command = $ this ->getApplication ()->find ('setup:db ' );
38+ $ command ->run ($ input , $ output );
39+
40+ $ command = $ this ->getApplication ()->find ('setup:smtp ' );
41+ $ command ->run ($ input , $ output );
42+
43+ $ command = $ this ->getApplication ()->find ('setup:env ' );
44+ $ command ->run ($ input , $ output );
45+ }
46+ }
0 commit comments