File size: 865 Bytes
cf14c12 | 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 | <?php
declare(strict_types=1);
namespace Shared\Infrastructure\FileSystem;
use IteratorAggregate;
use Shared\Infrastructure\FileSystem\Adapters\CdnAdapterInterface;
interface CdnAdapterCollectionInterface extends IteratorAggregate
{
/**
* Add a CDN implementation to the collection.
*
* @param string $key The key to register the implementation under.
* @param class-string<CdnAdapterInterface>|CdnAdapterInterface $adapter
* The adapter to register.
* @return static
*/
public function add(
string $key,
string|CdnAdapterInterface $adapter
): static;
/**
* Get a CDN implementation from the collection.
*
* @param string $key The key to retrieve the implementation for.
* @return CdnAdapterInterface
*/
public function get(string $key): CdnAdapterInterface;
}
|