1 | <?php |
||
13 | class Collection extends Filterable implements CollectionInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var EngineInterface |
||
17 | */ |
||
18 | private $engine; |
||
19 | |||
20 | public function __construct(EngineInterface $engine) |
||
25 | |||
26 | public function has(string $id): bool |
||
30 | |||
31 | public function read(string $id): array |
||
39 | |||
40 | public function insert(array $document): string |
||
44 | |||
45 | public function update(ExpressionInterface $expression, array $newDocument): int |
||
56 | |||
57 | public function delete(ExpressionInterface $expression): int |
||
69 | |||
70 | public function commit() |
||
74 | |||
75 | public function inTransaction(): bool |
||
79 | |||
80 | public function reset() |
||
84 | } |
||
85 |