Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 150
Zeile 85... Zeile 85...
85
     * @var string
85
     * @var string
86
     */
86
     */
87
    protected $systemOsFamily = PHP_OS_FAMILY;
87
    protected $systemOsFamily = PHP_OS_FAMILY;
Zeile 88... Zeile 88...
88
 
88
 
89
    /**
-
 
90
     * Create a new command instance.
-
 
91
     *
-
 
92
     * @param  \Illuminate\Http\Client\Factory  $http
-
 
93
     * @param  \Illuminate\Contracts\Cache\Repository  $cache
-
 
94
     * @return void
-
 
95
     */
-
 
96
    public function __construct(Http $http, Cache $cache)
-
 
97
    {
-
 
98
        parent::__construct();
-
 
99
 
-
 
100
        $this->http = $http;
-
 
101
        $this->cache = $cache;
-
 
102
    }
-
 
103
 
-
 
104
    /**
89
    /**
105
     * Configure the current command.
90
     * Configure the current command.
106
     *
91
     *
107
     * @return void
92
     * @return void
108
     */
93
     */
Zeile 116... Zeile 101...
116
    }
101
    }
Zeile 117... Zeile 102...
117
 
102
 
118
    /**
103
    /**
119
     * Execute the console command.
104
     * Execute the console command.
-
 
105
     *
-
 
106
     * @param  \Illuminate\Http\Client\Factory  $http
120
     *
107
     * @param  \Illuminate\Contracts\Cache\Repository  $cache
121
     * @return int
108
     * @return int
122
     */
109
     */
123
    public function handle()
110
    public function handle(Http $http, Cache $cache)
-
 
111
    {
-
 
112
        $this->http = $http;
-
 
113
        $this->cache = $cache;
124
    {
114
 
125
        try {
115
        try {
126
            $this->openUrl();
116
            $this->openUrl();
127
        } catch (ProcessFailedException $e) {
117
        } catch (ProcessFailedException $e) {
128
            if ($e->getProcess()->getExitCodeText() === 'Interrupt') {
118
            if ($e->getProcess()->getExitCodeText() === 'Interrupt') {
Zeile 188... Zeile 178...
188
    }
178
    }
Zeile 189... Zeile 179...
189
 
179
 
190
    /**
180
    /**
191
     * Determine the page to open.
181
     * Determine the page to open.
192
     *
182
     *
193
     * @return ?string
183
     * @return string|null
194
     */
184
     */
195
    protected function resolvePage()
185
    protected function resolvePage()
196
    {
186
    {
197
        if ($this->option('no-interaction') && $this->didNotRequestPage()) {
187
        if ($this->option('no-interaction') && $this->didNotRequestPage()) {
Zeile 214... Zeile 204...
214
    }
204
    }
Zeile 215... Zeile 205...
215
 
205
 
216
    /**
206
    /**
217
     * Ask the user which page they would like to open.
207
     * Ask the user which page they would like to open.
218
     *
208
     *
219
     * @return ?string
209
     * @return string|null
220
     */
210
     */
221
    protected function askForPage()
211
    protected function askForPage()
222
    {
212
    {
223
        return $this->askForPageViaCustomStrategy() ?? $this->askForPageViaAutocomplete();
213
        return $this->askForPageViaCustomStrategy() ?? $this->askForPageViaAutocomplete();
Zeile 224... Zeile 214...
224
    }
214
    }
225
 
215
 
226
    /**
216
    /**
227
     * Ask the user which page they would like to open via a custom strategy.
217
     * Ask the user which page they would like to open via a custom strategy.
228
     *
218
     *
229
     * @return ?string
219
     * @return string|null
230
     */
220
     */
231
    protected function askForPageViaCustomStrategy()
221
    protected function askForPageViaCustomStrategy()
232
    {
222
    {
Zeile 244... Zeile 234...
244
    }
234
    }
Zeile 245... Zeile 235...
245
 
235
 
246
    /**
236
    /**
247
     * Ask the user which page they would like to open using autocomplete.
237
     * Ask the user which page they would like to open using autocomplete.
248
     *
238
     *
249
     * @return ?string
239
     * @return string|null
250
     */
240
     */
251
    protected function askForPageViaAutocomplete()
241
    protected function askForPageViaAutocomplete()
252
    {
242
    {
253
        $choice = $this->components->choice(
243
        $choice = $this->components->choice(
Zeile 265... Zeile 255...
265
    }
255
    }
Zeile 266... Zeile 256...
266
 
256
 
267
    /**
257
    /**
268
     * Guess the page the user is attempting to open.
258
     * Guess the page the user is attempting to open.
269
     *
259
     *
270
     * @return ?string
260
     * @return string|null
271
     */
261
     */
272
    protected function guessPage()
262
    protected function guessPage()
273
    {
263
    {
274
        return $this->pages()
264
        return $this->pages()
Zeile 291... Zeile 281...
291
 
281
 
292
    /**
282
    /**
293
     * The section the user specifically asked to open.
283
     * The section the user specifically asked to open.
294
     *
284
     *
295
     * @param  string  $page
285
     * @param  string  $page
296
     * @return ?string
286
     * @return string|null
297
     */
287
     */
298
    protected function section($page)
288
    protected function section($page)
299
    {
289
    {
300
        return $this->didNotRequestSection()
290
        return $this->didNotRequestSection()
Zeile 314... Zeile 304...
314
 
304
 
315
    /**
305
    /**
316
     * Guess the section the user is attempting to open.
306
     * Guess the section the user is attempting to open.
317
     *
307
     *
318
     * @param  string  $page
308
     * @param  string  $page
319
     * @return ?string
309
     * @return string|null
320
     */
310
     */
321
    protected function guessSection($page)
311
    protected function guessSection($page)
322
    {
312
    {
323
        return $this->sectionsFor($page)
313
        return $this->sectionsFor($page)