1 | <?php |
||
10 | trait Set |
||
11 | { |
||
12 | /** |
||
13 | * The array containing the values keyed by their identity hash. |
||
14 | * |
||
15 | * @var array |
||
16 | */ |
||
17 | protected $values = []; |
||
18 | |||
19 | /** |
||
20 | * The amount of values in the set. |
||
21 | * |
||
22 | * @var int |
||
23 | */ |
||
24 | protected $length = 0; |
||
25 | |||
26 | public function count() |
||
30 | |||
31 | /** |
||
32 | * {@inheritDoc} |
||
33 | */ |
||
34 | public function clear() |
||
39 | |||
40 | /** |
||
41 | * {@inheritDoc} |
||
42 | */ |
||
43 | public function contains($value) |
||
47 | |||
48 | /** |
||
49 | * {@inheritDoc} |
||
50 | */ |
||
51 | public function add($value) |
||
55 | |||
56 | /** |
||
57 | * {@inheritDoc} |
||
58 | */ |
||
59 | public function addRef(&$value) |
||
72 | |||
73 | /** |
||
74 | * {@inheritDoc} |
||
75 | */ |
||
76 | public function remove($value) |
||
89 | |||
90 | /** |
||
91 | * @return bool |
||
92 | */ |
||
93 | final public function isArrayCompatible() |
||
97 | } |
||
98 |