16 lines
370 B
PHP
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;
|
|
}
|
|
} |