mirror of
https://github.com/wallabag/wallabag.git
synced 2024-09-27 05:50:02 +00:00
33 lines
517 B
PHP
33 lines
517 B
PHP
<?php
|
|
|
|
namespace Wallabag\Import;
|
|
|
|
class ImportChain
|
|
{
|
|
private $imports;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->imports = [];
|
|
}
|
|
|
|
/**
|
|
* Add an import to the chain.
|
|
*
|
|
* @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;
|
|
}
|
|
}
|