mirror of
https://github.com/retailcrm/transparent-email.git
synced 2024-11-22 05:16:05 +03:00
28 lines
524 B
PHP
28 lines
524 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace bkrukowski\TransparentEmail;
|
|
|
|
use bkrukowski\TransparentEmail\Services\ServiceInterface;
|
|
|
|
class ServiceCollector implements ServiceCollectorInterface
|
|
{
|
|
private $services = [];
|
|
|
|
public function addService(ServiceInterface $service): void
|
|
{
|
|
$this->services[] = $service;
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function getIterator(): \Traversable
|
|
{
|
|
foreach ($this->services as $service) {
|
|
yield $service;
|
|
}
|
|
}
|
|
}
|