1 | <?php |
||
9 | class Install extends Command |
||
10 | { |
||
11 | protected $progressBar; |
||
12 | |||
13 | /** |
||
14 | * The name and signature of the console command. |
||
15 | * |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $signature = 'backpack:base:install |
||
19 | {--timeout=300} : How many seconds to allow each process to run. |
||
20 | {--debug} : Show process output or not. Useful for debugging.'; |
||
21 | |||
22 | /** |
||
23 | * The console command description. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $description = 'Require dev packages and publish files for Backpack\Base to work'; |
||
28 | |||
29 | /** |
||
30 | * Create a new command instance. |
||
31 | * |
||
32 | * @return void |
||
|
|||
33 | */ |
||
34 | public function __construct() |
||
38 | |||
39 | /** |
||
40 | * Execute the console command. |
||
41 | * |
||
42 | * @return mixed |
||
43 | */ |
||
44 | public function handle() |
||
75 | |||
76 | /** |
||
77 | * Run a SSH command. |
||
78 | * |
||
79 | * @param string $command The SSH command that needs to be run |
||
80 | * @param bool $beforeNotice Information for the user before the command is run |
||
81 | * @param bool $afterNotice Information for the user after the command is run |
||
82 | * |
||
83 | * @return mixed Command-line output |
||
84 | */ |
||
85 | public function executeProcess($command, $beforeNotice = false, $afterNotice = false) |
||
111 | |||
112 | /** |
||
113 | * Write text to the screen for the user to see. |
||
114 | * |
||
115 | * @param [string] $type line, info, comment, question, error |
||
116 | * @param [string] $content |
||
117 | */ |
||
118 | public function echo($type, $content) |
||
129 | } |
||
130 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.