| 1 | <?php |
||
| 5 | abstract class JsonEntity extends FileEntity implements EntityInterface |
||
| 6 | { |
||
| 7 | protected $extension = 'json'; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * Transform the data to a string. |
||
| 11 | * |
||
| 12 | * @param array $data |
||
| 13 | * |
||
| 14 | * @return string |
||
| 15 | */ |
||
| 16 | protected function stringify(array $data) |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Transform the string to an array. |
||
| 23 | * |
||
| 24 | * @param string $source |
||
| 25 | * |
||
| 26 | * @return array |
||
| 27 | */ |
||
| 28 | protected function parse($source) |
||
| 32 | } |
||
| 33 |