izzum\statemachine\utils\Utils::getTransitionName PHP Метод

getTransitionName() публичный статический Метод

gets the transition name by two state names, using the default convention for a transition name (which is concatenating state-from to state-to with '_to_')
public static getTransitionName ( string $from, string $to ) : string
$from string the state from which the transition is made
$to string the state to which the transition will be made
Результат string _to_
    public static function getTransitionName($from, $to)
    {
        return $from . self::STATE_CONCATENATOR . $to;
    }

Usage Example

Пример #1
0
 /**
  * @test
  */
 public function shouldReturnCorrectTransitionName()
 {
     $from = 'state-from';
     $to = 'state-to';
     $this->assertEquals($from . Utils::STATE_CONCATENATOR . $to, Utils::getTransitionName($from, $to));
 }
All Usage Examples Of izzum\statemachine\utils\Utils::getTransitionName