public function addState(callable $stateBuilderCallable)
    {
        $stateBuilder = new StateBuilder();
        call_user_func($stateBuilderCallable, $stateBuilder, $this);
        $state = $stateBuilder->getState();

        $this->states[$state->getName()] = $state;

        return $this;
    }
public function addState(callable $stateBuilderCallable)
    {
        $stateBuilder = new StateBuilder();
        call_user_func($stateBuilderCallable, $stateBuilder, $this);
        $state = $stateBuilder->getState();

        $this->states[$state->getName()] = $state;

        return $this;
    }
public function addState ( callable $ stateBuilderCallable ) { $ stateBuilder = new StateBuilder ( ) ; call_user_func ( $ stateBuilderCallable , $ stateBuilder , $ this ) ; $ state = $ stateBuilder -> getState ( ) ; $ this -> states [ $ state -> getName ( ) ] = $ state ; return $ this ; }
Add new state
@param callable $stateBuilderCallable
@return MachineBuilder
Add new state