izzum\statemachine\Transition::getName PHP Method

getName() public method

the transition name is always unique for a statemachine since it constists of _to_
public getName ( ) : string
return string
    public function getName()
    {
        $name = Utils::getTransitionName($this->getStateFrom()->getName(), $this->getStateTo()->getName());
        return $name;
    }

Usage Example

Example #1
0
 /**
  * add an outgoing transition from this state.
  *
  * TRICKY: this method should be package visibility only,
  * so don't use directly. it is used to set the bidirectional association
  * for State and Transition from a Transition instance on the state the transition will be allowed to 
  * run from ('state from').
  *
  * @param Transition $transition            
  * @return boolan yes in case the transition was not on the State already or in case of an invalid transition
  */
 public function addTransition(Transition $transition)
 {
     $output = false;
     // check all existing transitions.
     if (!$this->hasTransition($transition->getName()) && $transition->getStateFrom()->getName() == $this->getName() && !$this->isFinal() && !$this->isRegex()) {
         $output = true;
         $this->transitions[] = $transition;
     }
     return $output;
 }
All Usage Examples Of izzum\statemachine\Transition::getName