| @@ 80-89 (lines=10) @@ | ||
| 77 | /** |
|
| 78 | * {@inheritdoc} |
|
| 79 | */ |
|
| 80 | public function create(array $data) |
|
| 81 | { |
|
| 82 | $id = $this->getId($data); |
|
| 83 | $file = $this->getFilePath($id); |
|
| 84 | $source = $this->stringify($data); |
|
| 85 | ||
| 86 | file_put_contents($file, $source); |
|
| 87 | ||
| 88 | return $id; |
|
| 89 | } |
|
| 90 | ||
| 91 | /** |
|
| 92 | * {@inheritdoc} |
|
| @@ 104-112 (lines=9) @@ | ||
| 101 | /** |
|
| 102 | * {@inheritdoc} |
|
| 103 | */ |
|
| 104 | public function update($id, array $data) |
|
| 105 | { |
|
| 106 | $file = $this->getFilePath($id); |
|
| 107 | $source = $this->stringify($data); |
|
| 108 | ||
| 109 | file_put_contents($file, $source); |
|
| 110 | ||
| 111 | return $data; |
|
| 112 | } |
|
| 113 | ||
| 114 | /** |
|
| 115 | * {@inheritdoc} |
|