<?php
/**
 * @copyright (c) Kufer Software GmbH, Oderstraße 7, D-84453 Mühldorf
 */

namespace Kufer\Web\KuferTools\Basis\UseCaseBuilder;

class ChildActionBus implements ActionBus
{
  
  private $actionBus;

  
  private $actionSequence;

  
  public function __construct(PrimaryActionBus $actionBus, array $actionSequence)
  {
    $this->actionBus = $actionBus;
    $this->actionSequence = $actionSequence;
  }

  public function trigger(Action $action)
  {
    $this->actionBus->triggerInActionSequence($this->actionSequence, $action);
  }

  
  public function getActionSequence(): array
  {
    return $this->actionSequence;
  }
}