]>
Commit | Line | Data |
---|---|---|
7019c7cf JB |
1 | <?php |
2 | ||
3 | namespace Wallabag\ImportBundle\Import; | |
4 | ||
5 | class ImportChain | |
6 | { | |
7 | private $imports; | |
8 | ||
9 | public function __construct() | |
10 | { | |
11 | $this->imports = []; | |
12 | } | |
13 | ||
14 | /** | |
15 | * Add an import to the chain. | |
16 | * | |
8d4ed0df | 17 | * @param string $alias |
7019c7cf JB |
18 | */ |
19 | public function addImport(ImportInterface $import, $alias) | |
20 | { | |
21 | $this->imports[$alias] = $import; | |
22 | } | |
23 | ||
24 | /** | |
25 | * Get all imports. | |
26 | * | |
27 | * @return array<ImportInterface> | |
28 | */ | |
29 | public function getAll() | |
30 | { | |
31 | return $this->imports; | |
32 | } | |
33 | } |