1 | <?php |
||
11 | class FieldValidatorFactory |
||
12 | { |
||
13 | /** |
||
14 | * @var array |
||
15 | */ |
||
16 | protected $aliases = [ |
||
17 | |||
18 | ]; |
||
19 | |||
20 | function __construct($aliases = null) |
||
26 | |||
27 | /** |
||
28 | * @param Field $field |
||
29 | * @return Validator |
||
30 | */ |
||
31 | public function createFor(Field $field, $operator) |
||
37 | |||
38 | public function createByDefinition($definition) |
||
46 | |||
47 | /** |
||
48 | * @param string $type |
||
49 | * @param array $params |
||
50 | * @return Validator |
||
51 | */ |
||
52 | public function createByType($type, $params = []) |
||
74 | } |
||
75 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.