Files
contabilidad/api/common/Service/DocumentHandler.php
2021-12-06 22:10:41 -03:00

16 lines
370 B
PHP

<?php
namespace Contabilidad\Common\Service;
class DocumentHandler {
protected array $handlers;
public function __construct(array $handlers) {
$this->handlers = $handlers;
}
public function handle(): array {
$output = [];
foreach ($this->handlers as $handler) {
$output = array_merge($output, $handler->load());
}
return $output;
}
}