1 | <?php |
||
9 | final class VaultContainer implements ContainerInterface, \Countable, \IteratorAggregate |
||
10 | { |
||
11 | /** |
||
12 | * @var Vault[] |
||
13 | */ |
||
14 | protected $vaults = []; |
||
15 | |||
16 | public function __construct(Configuration $configuration, Storeman $storeman) |
||
28 | |||
29 | /** |
||
30 | * Returns a vault by its title. |
||
31 | * |
||
32 | * @param string $title |
||
33 | * @return Vault |
||
34 | */ |
||
35 | public function getVaultByTitle(string $title): ?Vault |
||
39 | |||
40 | /** |
||
41 | * Returns a subset of the configured vaults identified by the given set of titles. |
||
42 | * |
||
43 | * @param array $titles |
||
44 | * @return Vault[] |
||
45 | */ |
||
46 | public function getVaultsByTitles(array $titles): array |
||
53 | |||
54 | /** |
||
55 | * Returns all those vaults that have a given revision. |
||
56 | * |
||
57 | * @param int $revision |
||
58 | * @return Vault[] |
||
59 | */ |
||
60 | public function getVaultsHavingRevision(int $revision): array |
||
67 | |||
68 | /** |
||
69 | * Returns the vault with the highest priority. |
||
70 | * |
||
71 | * @param Vault[] $vaults Vaults to consider. Defaults to all configured vaults. |
||
72 | * @return Vault |
||
73 | */ |
||
74 | public function getPrioritizedVault(array $vaults = null): ?Vault |
||
92 | |||
93 | /** |
||
94 | * {@inheritdoc} |
||
95 | */ |
||
96 | public function has($id) |
||
100 | |||
101 | /** |
||
102 | * {@inheritdoc} |
||
103 | */ |
||
104 | public function get($id) |
||
113 | |||
114 | /** |
||
115 | * {@inheritdoc} |
||
116 | */ |
||
117 | public function count() |
||
121 | |||
122 | /** |
||
123 | * {@inheritdoc} |
||
124 | */ |
||
125 | public function getIterator() |
||
129 | } |
||
130 |