1 | <?php |
||
13 | class InMemoryRepository implements WritableRepository |
||
14 | { |
||
15 | use Repository\Capability\Notify; |
||
16 | use Repository\Capability\PropertySearchByIteration; |
||
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) |
||
55 | |||
56 | /** |
||
57 | * {@inheritDoc} |
||
58 | */ |
||
59 | public function addMany(Collection $characters) |
||
68 | |||
69 | /** |
||
70 | * {@inheritDoc} |
||
71 | */ |
||
72 | public function getAll() |
||
76 | |||
77 | /** |
||
78 | * {@inheritDoc} |
||
79 | */ |
||
80 | public function count() |
||
84 | |||
85 | /** |
||
86 | * @param Codepoint $codepoint |
||
87 | * @return int |
||
88 | */ |
||
89 | private function indexFromCodepoint(Codepoint $codepoint) |
||
93 | } |