1 | <?php |
||
8 | class AlphabetGenerateCommand extends Command |
||
9 | { |
||
10 | /** |
||
11 | * The console command name. |
||
12 | * |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $name = 'hashid:alphabet'; |
||
16 | |||
17 | /** |
||
18 | * The console command description. |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $description = 'Generate a random alphabet for Hashid encoding'; |
||
23 | |||
24 | /** |
||
25 | * Execute the console command. |
||
26 | * |
||
27 | * @return mixed |
||
28 | */ |
||
29 | 1 | public function handle() |
|
37 | |||
38 | /** |
||
39 | * Get "times" option value. |
||
40 | * |
||
41 | * @return int |
||
42 | */ |
||
43 | 1 | protected function getTimes() |
|
49 | |||
50 | /** |
||
51 | * Generate random alphabet. |
||
52 | * |
||
53 | * @return string |
||
54 | */ |
||
55 | 1 | protected function generateRandomAlphabet($characters) |
|
59 | |||
60 | /** |
||
61 | * Get the console command options. |
||
62 | * |
||
63 | * @return array |
||
64 | */ |
||
65 | 1 | protected function getOptions() |
|
72 | } |
||
73 |