public function addState($state)
    {
        $this->_states[$state] = $state;

        if ($this->_currentState === null) {
            $this->_currentState = $state;
        }
    }
public function addState($state)
    {
        $this->_states[$state] = $state;

        if ($this->_currentState === null) {
            $this->_currentState = $state;
        }
    }
public function addState ( $ state ) { $ this -> _states [ $ state ] = $ state ; if ( $ this -> _currentState === null ) { $ this -> _currentState = $ state ; } }
Add state to the state machine

@param integer|string $state
Add state to the state machine