Finite\StateMachine\StateMachine::findInitialState PHP 메소드

findInitialState() 보호된 메소드

Find and return the Initial state if exists.
protected findInitialState ( ) : string
리턴 string
    protected function findInitialState()
    {
        foreach ($this->states as $state) {
            if (State::TYPE_INITIAL === $state->getType()) {
                return $state->getName();
            }
        }
        throw new Exception\StateException(sprintf('No initial state found on object "%s" with graph "%s".', get_class($this->getObject()), $this->getGraph()));
    }