aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Import/ImportChain.php
blob: 9dd779569790cf15517c3857c004a9f5187dd95f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php

namespace Wallabag\ImportBundle\Import;

class ImportChain
{
    private $imports;

    public function __construct()
    {
        $this->imports = [];
    }

    /**
     * Add an import to the chain.
     *
     * @param ImportInterface $import
     * @param string          $alias
     */
    public function addImport(ImportInterface $import, $alias)
    {
        $this->imports[$alias] = $import;
    }

    /**
     * Get all imports.
     *
     * @return array<ImportInterface>
     */
    public function getAll()
    {
        return $this->imports;
    }
}