mirror of
https://github.com/retailcrm/transparent-email.git
synced 2024-11-29 16:56:04 +03:00
27 lines
501 B
PHP
27 lines
501 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)
|
||
|
{
|
||
|
$this->services[] = $service;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @inheritdoc
|
||
|
*/
|
||
|
public function getIterator()
|
||
|
{
|
||
|
foreach ($this->services as $service) {
|
||
|
yield $service;
|
||
|
}
|
||
|
}
|
||
|
}
|