1 | <?php |
||
22 | class StoragePersister |
||
23 | { |
||
24 | |||
25 | /** |
||
26 | * Mass assigned storage interface |
||
27 | * @var MassAssignedInterface |
||
28 | */ |
||
29 | private $storage = null; |
||
30 | |||
31 | /** |
||
32 | * Peristence path |
||
33 | * @var string |
||
34 | */ |
||
35 | private $path = ''; |
||
36 | |||
37 | 1 | public function __construct(MassAssignedInterface $storage, $path) |
|
42 | |||
43 | /** |
||
44 | * Save data to disk |
||
45 | */ |
||
46 | 1 | public function save() |
|
52 | |||
53 | /** |
||
54 | * Read data from disk |
||
55 | */ |
||
56 | 1 | public function load() |
|
62 | |||
63 | /** |
||
64 | * Get storage filename |
||
65 | * @return string |
||
66 | */ |
||
67 | 1 | private function _getFileName() |
|
71 | |||
72 | } |
||
73 |