wallabag/src/Wallabag/ImportBundle/Import/ImportChain.php
Jeremy Benoist 7019c7cf6c Add tagged services for import
- list services in /import
- add url to import service
- ImportBundle routing are now prefixed by /import
- optimize flush in each import (flushing each 20 contents)
- improve design of each import
- add more tests
2016-01-02 23:27:41 +01:00

34 lines
577 B
PHP

<?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;
}
}