Metabor\Statemachine\Statemachine::getCurrentContext PHP Метод

getCurrentContext() публичный Метод

public getCurrentContext ( ) : ArrayAccess
Результат ArrayAccess
    public function getCurrentContext()
    {
        return $this->currentContext;
    }

Usage Example

Пример #1
0
 /**
  * @param \SplSubject|StatemachineInterface|Statemachine $stateMachine
  * @return \ArrayAccess|null
  */
 private function getStateMachineContext($stateMachine)
 {
     $context = null;
     if ($stateMachine instanceof Statemachine) {
         $context = $stateMachine->getCurrentContext();
     }
     return $context;
 }