示例#1
0
 /**
  * This method adds a target state.
  *
  * @access public
  * @param mixed $target                                     a target state to be added
  */
 public function addTarget($target)
 {
     if ($target !== null) {
         $tid = $target instanceof Automaton\IState ? $target->getId() : '' . $target;
         $this->targets->putValue($tid);
     }
 }
示例#2
0
 /**
  * This method adds the specified transition to the state.
  *
  * @access public
  * @param mixed $transition                                 the transition to be added
  */
 public function addTransition($transition)
 {
     if ($transition !== null) {
         $tid = $transition instanceof Automaton\ITransition ? $transition->getId() : '' . $transition;
         $this->transitions->putValue($tid);
     }
 }