1 | <?php |
||
7 | trait ValidatorTrait |
||
8 | { |
||
9 | |||
10 | /** |
||
11 | * @param string $value |
||
12 | * @return void |
||
13 | * @throws \InvalidArgumentException |
||
14 | */ |
||
15 | 2 | protected function isValidColor(string $value) |
|
21 | |||
22 | /** |
||
23 | * @param string $value |
||
24 | * @param int $length |
||
25 | * @return void |
||
26 | * @throws \InvalidArgumentException |
||
27 | */ |
||
28 | 28 | protected function isValidString(string $value, int $length = 20) |
|
34 | |||
35 | /** |
||
36 | * @param string $value |
||
37 | * @return void |
||
38 | * @throws \InvalidArgumentException |
||
39 | */ |
||
40 | 30 | protected function isValidUrl(string $value) |
|
46 | |||
47 | /** |
||
48 | * @param string $value |
||
49 | * @return void |
||
50 | * @throws \InvalidArgumentException |
||
51 | */ |
||
52 | 7 | protected function isValidLocale(string $value) |
|
58 | |||
59 | /** |
||
60 | * @param string $value |
||
61 | * @return void |
||
62 | * @throws \InvalidArgumentException |
||
63 | */ |
||
64 | 2 | protected function isValidCountry(string $value) |
|
70 | |||
71 | /** |
||
72 | * @param string $value |
||
73 | * @return void |
||
74 | * @throws \InvalidArgumentException |
||
75 | */ |
||
76 | 10 | protected function isValidDateTime(string $value) |
|
82 | |||
83 | /** |
||
84 | * @param array $array |
||
85 | * @param int $maxSize |
||
86 | * @param int $minSize |
||
87 | * @return void |
||
88 | * @throws \InvalidArgumentException |
||
89 | */ |
||
90 | 24 | protected function isValidArray(array $array, int $maxSize, int $minSize = null) |
|
100 | |||
101 | /** |
||
102 | * @param string $value |
||
103 | * @return void |
||
104 | * @throws \InvalidArgumentException |
||
105 | */ |
||
106 | 6 | protected function isValidCurrency(string $value) |
|
112 | |||
113 | /** |
||
114 | * @param string $filename |
||
115 | * @param array $allowedExtension |
||
116 | * @return void |
||
117 | * @throws \InvalidArgumentException |
||
118 | */ |
||
119 | 3 | protected function isValidExtension(string $filename, array $allowedExtension) |
|
126 | |||
127 | /** |
||
128 | * @param \Kerox\Messenger\Model\Common\Buttons\AbstractButtons[] $buttons |
||
129 | * @param array $allowedButtonsType |
||
130 | * @return void |
||
131 | */ |
||
132 | 6 | protected function isValidButtons(array $buttons, array $allowedButtonsType) |
|
141 | } |
||
142 |