1 | <?php |
||
20 | class StringNode extends Node implements IStringNode { |
||
21 | /** |
||
22 | * StringNode constructor. |
||
23 | * |
||
24 | * @param IConfigSchema $schema |
||
25 | * @param string $key |
||
26 | * @param string $message |
||
27 | */ |
||
28 | public function __construct(IConfigSchema $schema, $key, $message = null) { |
||
36 | |||
37 | /** |
||
38 | * @param int $min |
||
39 | * |
||
40 | * @return IStringNode |
||
41 | */ |
||
42 | public function min($min) { |
||
45 | |||
46 | /** |
||
47 | * @param int $max |
||
48 | * |
||
49 | * @return IStringNode |
||
50 | */ |
||
51 | public function max($max) { |
||
54 | |||
55 | /** |
||
56 | * @param int $length |
||
57 | * |
||
58 | * @return IStringNode |
||
59 | */ |
||
60 | public function length($length) { |
||
63 | |||
64 | /** |
||
65 | * @return IStringNode |
||
66 | */ |
||
67 | public function email() { |
||
70 | |||
71 | /** |
||
72 | * @return IStringNode |
||
73 | */ |
||
74 | public function url() { |
||
77 | |||
78 | /** |
||
79 | * @return IStringNode |
||
80 | */ |
||
81 | public function alpha() { |
||
84 | |||
85 | /** |
||
86 | * @return IStringNode |
||
87 | */ |
||
88 | public function alphanumeric() { |
||
91 | |||
92 | /** |
||
93 | * @param string $regex |
||
94 | * |
||
95 | * @return IStringNode |
||
96 | */ |
||
97 | public function matches($regex) { |
||
100 | |||
101 | /** |
||
102 | * @param array $values |
||
103 | * |
||
104 | * @return IStringNode |
||
105 | */ |
||
106 | public function allowed(array $values) { |
||
109 | |||
110 | /** |
||
111 | * @param array $values |
||
112 | * |
||
113 | * @return IStringNode |
||
114 | */ |
||
115 | public function forbidden(array $values) { |
||
118 | } |
||
119 |