1 | <?php |
||
25 | final class DestinationCollection implements DestinationInterface |
||
26 | { |
||
27 | /** |
||
28 | * @var DestinationInterface[] |
||
29 | */ |
||
30 | private $destinations; |
||
31 | |||
32 | public function __construct(array $destinations = array()) |
||
40 | |||
41 | public function addDestination(DestinationInterface $destination) |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function push(BackupInterface $backup) |
||
56 | |||
57 | /** |
||
58 | * {@inheritdoc} |
||
59 | */ |
||
60 | public function get($name) |
||
61 | { |
||
62 | return $this->destinations[0]->get($name); |
||
63 | } |
||
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | public function has($name) |
||
69 | { |
||
70 | return $this->destinations[0]->has($name); |
||
71 | } |
||
72 | |||
73 | /** |
||
74 | * {@inheritdoc} |
||
75 | */ |
||
76 | public function delete($name) |
||
77 | { |
||
78 | foreach ($this->destinations as $destination) { |
||
79 | $destination->delete($name); |
||
80 | } |
||
81 | } |
||
82 | |||
83 | /** |
||
84 | * {@inheritdoc} |
||
85 | */ |
||
86 | public function all() |
||
90 | |||
91 | /** |
||
92 | * {@inheritdoc} |
||
93 | */ |
||
94 | public function getIterator() |
||
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | */ |
||
102 | public function count() |
||
106 | } |
||
107 |