1 | <?php |
||
22 | class Language extends AbstractValidator |
||
23 | { |
||
24 | const FILENAME = '../../resource/available-dictionaries.php'; |
||
25 | /** |
||
26 | * Invalid syntax |
||
27 | * |
||
28 | * @const INVALID |
||
29 | */ |
||
30 | const INVALID_LANGUAGE = 'invalidLanguage'; |
||
31 | |||
32 | /** |
||
33 | * Message templates |
||
34 | * |
||
35 | * @var array |
||
36 | */ |
||
37 | protected $messageTemplates = [ |
||
38 | self::INVALID_LANGUAGE => '', // added dynamically |
||
39 | ]; |
||
40 | |||
41 | /** |
||
42 | * Returns true, if value is valid. False otherwise. |
||
43 | * |
||
44 | * @param mixed $value |
||
45 | * |
||
46 | * @return bool |
||
47 | */ |
||
48 | 5 | public function isValid($value) |
|
70 | } |