handlers = $tmapFactory->create( [ 'array' => $handlers, 'type' => HandlerInterface::class ] ); } /** * Handles response * * @param array $handlingSubject * @param array $response * @return void */ public function handle(array $handlingSubject, array $response) { foreach ($this->handlers as $handler) { // @TODO implement exceptions catching $handler->handle($handlingSubject, $response); } } }