1 | <?php |
||
11 | class Storage |
||
12 | { |
||
13 | /** |
||
14 | * @var array list with all allowed characters and their type (type key => characters string pairs) |
||
15 | */ |
||
16 | protected static $characters = [ |
||
17 | 'upperCase' => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', |
||
18 | 'lowerCase' => 'abcdefghijklmnopqrstuvwxyz', |
||
19 | 'digits' => '0123456789', |
||
20 | 'special' => '~!@#$%^&*=+/?.,\|\';:', |
||
21 | 'brackets' => '()[]{}<>', |
||
22 | 'minus' => '-', |
||
23 | 'underline' => '_', |
||
24 | 'space' => ' ', |
||
25 | ]; |
||
26 | |||
27 | /** |
||
28 | * Pull and return the array with all characters. |
||
29 | * |
||
30 | * @return array the characters list |
||
31 | */ |
||
32 | public static function getCharacters(): array |
||
36 | |||
37 | /** |
||
38 | * Return the characters pattern for specific group type. |
||
39 | * |
||
40 | * @param string $group passed specific group type |
||
41 | * @return string the group characters |
||
42 | */ |
||
43 | public static function getGroup(string $group): string |
||
49 | |||
50 | /** |
||
51 | * Change characters pattern for specific group. |
||
52 | * |
||
53 | * @param string $group specific group |
||
54 | * @param string $pattern new characters pattern |
||
55 | * @return void |
||
56 | */ |
||
57 | public static function setGroup(string $group, string $pattern) |
||
63 | } |
||
64 |