diff options
author | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2016-01-07 22:15:08 +0100 |
---|---|---|
committer | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2016-01-07 22:15:08 +0100 |
commit | 39643c6b76d92d509b1af0228b6379d7fdce8a1c (patch) | |
tree | 931dceef7dbc8ae9911d01ded709d558417a6cdd /src/Wallabag/ImportBundle/Import/ImportChain.php | |
parent | 488a468e3e11ff0ab6284afe232bf0f7fa68a8eb (diff) | |
parent | b88cf91fc8371194df78e690983c61ea94f266cd (diff) | |
download | wallabag-39643c6b76d92d509b1af0228b6379d7fdce8a1c.tar.gz wallabag-39643c6b76d92d509b1af0228b6379d7fdce8a1c.tar.zst wallabag-39643c6b76d92d509b1af0228b6379d7fdce8a1c.zip |
Merge pull request #1493 from wallabag/v2-pocket-import2.0.0-alpha.1
v2 – 1st draft for Pocket import via API & Wallabag v1 import
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/ImportChain.php')
-rw-r--r-- | src/Wallabag/ImportBundle/Import/ImportChain.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/Wallabag/ImportBundle/Import/ImportChain.php b/src/Wallabag/ImportBundle/Import/ImportChain.php new file mode 100644 index 00000000..9dd77956 --- /dev/null +++ b/src/Wallabag/ImportBundle/Import/ImportChain.php | |||
@@ -0,0 +1,34 @@ | |||
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 | * | ||
17 | * @param ImportInterface $import | ||
18 | * @param string $alias | ||
19 | */ | ||
20 | public function addImport(ImportInterface $import, $alias) | ||
21 | { | ||
22 | $this->imports[$alias] = $import; | ||
23 | } | ||
24 | |||
25 | /** | ||
26 | * Get all imports. | ||
27 | * | ||
28 | * @return array<ImportInterface> | ||
29 | */ | ||
30 | public function getAll() | ||
31 | { | ||
32 | return $this->imports; | ||
33 | } | ||
34 | } | ||