| 1 | <?php |
||
| 10 | class Dictionary |
||
| 11 | { |
||
| 12 | const DICTIONARY_DIR = 'dictionary'; |
||
| 13 | const DICTIONARY_FILE_SUFFIX = 'json'; |
||
| 14 | |||
| 15 | private $data; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param $key |
||
| 19 | * |
||
| 20 | * @throws \Exception |
||
| 21 | * |
||
| 22 | * @return array|mixed |
||
| 23 | */ |
||
| 24 | 11 | private function load($key) |
|
| 31 | |||
| 32 | /** |
||
| 33 | * @return array |
||
| 34 | */ |
||
| 35 | 23 | public function getData() |
|
| 39 | |||
| 40 | /** |
||
| 41 | * @param array $data |
||
| 42 | */ |
||
| 43 | 23 | public function setData(array $data) |
|
| 47 | |||
| 48 | /** |
||
| 49 | * @param $key |
||
| 50 | * |
||
| 51 | * @return mixed |
||
| 52 | */ |
||
| 53 | 23 | public function get($key) |
|
| 64 | } |
||
| 65 |