1 | <?php |
||
22 | final class SourcesRegistry implements SourcesRegistryInterface |
||
23 | { |
||
24 | /** |
||
25 | * @var SourceInterface[] |
||
26 | */ |
||
27 | private $sources; |
||
28 | |||
29 | public function __construct(array $sources = array()) |
||
37 | |||
38 | /** |
||
39 | * {@inheritdoc} |
||
40 | */ |
||
41 | public function add(SourceInterface $source) |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function has($name) |
||
57 | |||
58 | /** |
||
59 | * {@inheritdoc} |
||
60 | */ |
||
61 | public function get($name) |
||
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | public function all() |
||
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | public function getIterator() |
||
81 | |||
82 | /** |
||
83 | * Filter sources. |
||
84 | * |
||
85 | * @param SourcesRegistryInterface $registry Sources collection. |
||
86 | * @param string|array|null $names Source names to keep. |
||
87 | * @return SourceInterface[] |
||
88 | */ |
||
89 | public static function filter(SourcesRegistryInterface $registry, $names = null) |
||
111 | } |
||
112 |