1 | <?php |
||
17 | class PublishInfo extends Command |
||
18 | { |
||
19 | use ChecksToken, ChecksServer, ChecksSite; |
||
20 | |||
21 | /** |
||
22 | * Servers |
||
23 | * |
||
24 | * @var array |
||
25 | */ |
||
26 | protected $servers; |
||
27 | |||
28 | /** |
||
29 | * The name and signature of the console command. |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $signature = 'publish:info'; |
||
34 | |||
35 | /** |
||
36 | * The console command description. |
||
37 | * |
||
38 | * @var string |
||
39 | */ |
||
40 | protected $description = 'Show Acacha Forge info'; |
||
41 | |||
42 | /** |
||
43 | * Guzzle Http client |
||
44 | * |
||
45 | * @var Client |
||
46 | */ |
||
47 | protected $http; |
||
48 | |||
49 | /** |
||
50 | * PublishCreateSite constructor. |
||
51 | * |
||
52 | * @param Client $client |
||
53 | */ |
||
54 | public function __construct(Client $client) |
||
59 | |||
60 | /** |
||
61 | * Execute the console command. |
||
62 | * |
||
63 | */ |
||
64 | public function handle() |
||
86 | |||
87 | /** |
||
88 | * Check and obtain token state. |
||
89 | */ |
||
90 | protected function token() |
||
102 | |||
103 | /** |
||
104 | * Check and obtain server Forge id. |
||
105 | * |
||
106 | * @return null |
||
107 | */ |
||
108 | protected function server() |
||
112 | |||
113 | /** |
||
114 | * Check and obtain site Forge id. |
||
115 | * |
||
116 | * @return null |
||
117 | */ |
||
118 | protected function site() |
||
122 | |||
123 | /** |
||
124 | * Check and obtain ip. |
||
125 | * |
||
126 | * @return null |
||
127 | */ |
||
128 | protected function ip() |
||
132 | |||
133 | /** |
||
134 | * Check and obtain server name. |
||
135 | * |
||
136 | * @return null |
||
137 | */ |
||
138 | protected function name() |
||
142 | |||
143 | /** |
||
144 | * Check and obtain ip. |
||
145 | * |
||
146 | * @return null |
||
147 | */ |
||
148 | protected function check($env_var, $functionName) |
||
160 | } |
||
161 |