1 | <?php |
||
13 | class InMemoryRepository implements WritableRepository |
||
14 | { |
||
15 | use Repository\Capability\Notify; |
||
16 | use Repository\Capability\BlockSearchByIteration; |
||
17 | |||
18 | /** |
||
19 | * @var array |
||
20 | */ |
||
21 | private $characters = []; |
||
22 | |||
23 | /** |
||
24 | * {@inheritDoc} |
||
25 | */ |
||
26 | public function getByCodepoint(Codepoint $codepoint) |
||
36 | |||
37 | /** |
||
38 | * {@inheritDoc} |
||
39 | */ |
||
40 | public function getByCodepoints(Codepoint\Collection $codepoints) |
||
53 | |||
54 | /** |
||
55 | * {@inheritDoc} |
||
56 | */ |
||
57 | public function addMany(Collection $characters) |
||
66 | |||
67 | /** |
||
68 | * {@inheritDoc} |
||
69 | */ |
||
70 | public function getAll() |
||
74 | |||
75 | /** |
||
76 | * {@inheritDoc} |
||
77 | */ |
||
78 | public function count() |
||
82 | |||
83 | /** |
||
84 | * @param Codepoint $codepoint |
||
85 | * @return int |
||
86 | */ |
||
87 | private function indexFromCodepoint(Codepoint $codepoint) |
||
91 | } |