Metabor\Statemachine\Factory\StatefulStateNameDetector::detectCurrentStateName PHP Метод

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

См. также: MetaborStd\Statemachine\Factory\StateNameDetectorInterface::detectCurrentStateName()
public detectCurrentStateName ( $subject )
    public function detectCurrentStateName($subject)
    {
        if ($subject instanceof StatefulInterface) {
            return $subject->getCurrentStateName();
        } else {
            throw new \InvalidArgumentException('Subject has to implement the StatefulInterface!');
        }
    }
StatefulStateNameDetector