src/Infrastructure/Workflow/XmlStateMachineBuilder.php
protected function createState(array $state_definition)
    {
        $state_implementor = isset($state_definition['class']) ? $state_definition['class'] : State::CLASS;
        $this->loadStateImplementor($state_implementor);

        $state = $this->service_locator->make(
            $state_implementor,
            [
                ':name' => $state_definition['name'],
                ':type' => $state_definition['type'],
                ':options' => $state_definition['options'],
            ]
        );

        if (!$state instanceof StateInterface) {
            throw new RuntimeError(
                sprintf(
                    'Configured implementor "%s" for state "%s" must implement: %s',
                    $state_implementor,
                    $state_definition['name'],
                    StateInterface::CLASS
                )
            );
        }

        return $state;
    }
protected function createState(array $state_definition)
    {
        $state_implementor = isset($state_definition['class']) ? $state_definition['class'] : State::CLASS;
        $this->loadStateImplementor($state_implementor);

        $state = $this->service_locator->make(
            $state_implementor,
            [
                ':name' => $state_definition['name'],
                ':type' => $state_definition['type'],
                ':options' => $state_definition['options'],
            ]
        );

        if (!$state instanceof StateInterface) {
            throw new RuntimeError(
                sprintf(
                    'Configured implementor "%s" for state "%s" must implement: %s',
                    $state_implementor,
                    $state_definition['name'],
                    StateInterface::CLASS
                )
            );
        }

        return $state;
    }
protected function createState ( array $ state_definition ) { $ state_implementor = isset ( $ state_definition [ 'class' ] ) ? $ state_definition [ 'class' ] : State :: CLASS ; $ this -> loadStateImplementor ( $ state_implementor ) ; $ state = $ this -> service_locator -> make ( $ state_implementor , [ ':name' => $ state_definition [ 'name' ] , ':type' => $ state_definition [ 'type' ] , ':options' => $ state_definition [ 'options' ] , ] ) ; if ( ! $ state instanceof StateInterface ) { throw new RuntimeError ( sprintf ( 'Configured implementor "%s" for state "%s" must implement: %s' , $ state_implementor , $ state_definition [ 'name' ] , StateInterface :: CLASS ) ) ; } return $ state ; }
Creates a concrete StateInterface instance based on the given state definition.

@param array $state_definition

@return StateInterface
Creates a concrete StateInterface instance based on the given state definition .