src/StateMachineAwareTrait.php
protected function _setStateMachine($stateMachine)
    {
        if ($stateMachine !== null && !($stateMachine instanceof StateMachineInterface)) {
            throw $this->_createInvalidArgumentException(
                $this->__('Argument is not a valid state machine instance'),
                null,
                null,
                $stateMachine
            );
        }

        $this->stateMachine = $stateMachine;
    }
protected function _setStateMachine($stateMachine)
    {
        if ($stateMachine !== null && !($stateMachine instanceof StateMachineInterface)) {
            throw $this->_createInvalidArgumentException(
                $this->__('Argument is not a valid state machine instance'),
                null,
                null,
                $stateMachine
            );
        }

        $this->stateMachine = $stateMachine;
    }
protected function _setStateMachine ( $ stateMachine ) { if ( $ stateMachine !== null && ! ( $ stateMachine instanceof StateMachineInterface ) ) { throw $ this -> _createInvalidArgumentException ( $ this -> __ ( 'Argument is not a valid state machine instance' ) , null , null , $ stateMachine ) ; } $ this -> stateMachine = $ stateMachine ; }
Sets the state machine for this instance.

@since [*next-version*]

@param StateMachineInterface|null $stateMachine The state machine instance or null
Sets the state machine for this instance .