1 | <?php |
||
8 | class UrlCollection implements \Countable |
||
9 | { |
||
10 | |||
11 | /** |
||
12 | * @var Url[] |
||
13 | */ |
||
14 | private $urls = []; |
||
15 | |||
16 | /** |
||
17 | * @param Url $url |
||
18 | */ |
||
19 | 11 | public function push(Url $url) |
|
25 | |||
26 | /** |
||
27 | * @return Url |
||
28 | * @throws EmptyCollectionException |
||
29 | */ |
||
30 | 10 | public function pop() |
|
38 | |||
39 | /** |
||
40 | * @param Url $url |
||
41 | * |
||
42 | * @return bool |
||
43 | */ |
||
44 | 11 | public function contains(Url $url) |
|
48 | |||
49 | /** |
||
50 | * @return int |
||
51 | */ |
||
52 | 10 | public function count() |
|
56 | |||
57 | /** |
||
58 | * @return void |
||
59 | */ |
||
60 | 11 | public function reset() |
|
64 | |||
65 | /** |
||
66 | * @return array |
||
67 | */ |
||
68 | 9 | public function toArray() |
|
77 | } |
||
78 |