1 | <?php |
||
18 | class FileStorage extends AbstractStorage |
||
19 | { |
||
20 | /** |
||
21 | * @var string Storage directory |
||
22 | */ |
||
23 | private $directory; |
||
24 | |||
25 | /** |
||
26 | * @param string $directory Storage directory |
||
27 | * @param HashingStrategyInterface $hashingStrategy Hashing strategy |
||
28 | */ |
||
29 | public function __construct($directory = '/tmp', HashingStrategyInterface $hashingStrategy = null) |
||
35 | |||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | */ |
||
39 | public function add($object, $id = null) |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function contains($object) |
||
57 | |||
58 | /** |
||
59 | * {@inheritdoc} |
||
60 | */ |
||
61 | public function containsId($id) |
||
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | public function findById($id) |
||
77 | |||
78 | /** |
||
79 | * {@inheritdoc} |
||
80 | */ |
||
81 | public function remove($object) |
||
85 | |||
86 | /** |
||
87 | * {@inheritdoc} |
||
88 | */ |
||
89 | public function removeById($id) |
||
95 | |||
96 | /** |
||
97 | * {@inheritdoc} |
||
98 | */ |
||
99 | public function all() |
||
103 | } |
||
104 |