Ejemplo n.º 1
0
 /**
  * Update payload with new state data
  *
  * @param StateInterface   $state
  * @param PayloadInterface $payload
  */
 private function updatePayload(StateInterface $state, PayloadInterface $payload)
 {
     $payload->setState($state->getName());
     foreach ((array) $state->getFlags() as $flag) {
         $payload->setFlag($flag);
     }
 }
Ejemplo n.º 2
0
 /**
  * Create edge for dot notation
  *
  * @param StateInterface $state
  * @param EventInterface $event
  * @param string         $nextState
  * @param Style          $style
  *
  * @return Edge
  */
 private function createEdge(StateInterface $state, EventInterface $event, $nextState, Style $style)
 {
     return new Edge($state->getName(), $nextState, $event->getName(), $style, $event->getAttributes()->get('comment'), $event->getTimeout());
 }