Finite\StateMachine\StateMachine::getState PHP Method

getState() public method

public getState ( $name )
    public function getState($name)
    {
        $name = (string) $name;
        if (!isset($this->states[$name])) {
            throw new Exception\StateException(sprintf('Unable to find a state called "%s" on object "%s" with graph "%s".', $name, get_class($this->getObject()), $this->getGraph()));
        }
        return $this->states[$name];
    }