@@ -43,11 +43,19 @@ |
||
| 43 | 43 | } |
| 44 | 44 | return $names; |
| 45 | 45 | } |
| 46 | + |
|
| 47 | + /** |
|
| 48 | + * @param string $name |
|
| 49 | + */ |
|
| 46 | 50 | public function set($name,$data) |
| 47 | 51 | { |
| 48 | 52 | $this->cache->forever($this->prefix . $name,$this->encode($data)); |
| 49 | 53 | $this->addNames($name); |
| 50 | 54 | } |
| 55 | + |
|
| 56 | + /** |
|
| 57 | + * @param string $yaml_data |
|
| 58 | + */ |
|
| 51 | 59 | public function importYaml($yaml_data) |
| 52 | 60 | { |
| 53 | 61 | $data = Yaml::parse($yaml_data); |
@@ -25,7 +25,9 @@ |
||
| 25 | 25 | throw new \Exception('value is null'); |
| 26 | 26 | } |
| 27 | 27 | $data = $this->cache->get($this->prefix . $name); |
| 28 | - if ( ! $data ) return null; |
|
| 28 | + if ( ! $data ) {
|
|
| 29 | + return null; |
|
| 30 | + } |
|
| 29 | 31 | |
| 30 | 32 | $data = $this->decode($data); |
| 31 | 33 | if ( isset($data[$key]) === false ) { |