public function initialize(
        $object,
        StateLineStack $stateLineStack,
        $description
    ) {
        if ($stateLineStack->getLastStateLine() instanceof StateLineInterface) {
            throw new ObjectAlreadyInitializedException();
        }

        $pointOfEntry = $this
            ->machine
            ->getPointOfEntry();

        $stateLine = $this->createStateLine(
            $pointOfEntry,
            $description
        );

        $stateLineStack->addStateLine($stateLine);

        $this
            ->machineEventDispatcher
            ->dispatchInitializationEvents(
                $this->machine,
                $object,
                $stateLineStack
            );

        return $stateLineStack;
    }
public function initialize(
        $object,
        StateLineStack $stateLineStack,
        $description
    ) {
        if ($stateLineStack->getLastStateLine() instanceof StateLineInterface) {
            throw new ObjectAlreadyInitializedException();
        }

        $pointOfEntry = $this
            ->machine
            ->getPointOfEntry();

        $stateLine = $this->createStateLine(
            $pointOfEntry,
            $description
        );

        $stateLineStack->addStateLine($stateLine);

        $this
            ->machineEventDispatcher
            ->dispatchInitializationEvents(
                $this->machine,
                $object,
                $stateLineStack
            );

        return $stateLineStack;
    }
public function initialize ( $ object , StateLineStack $ stateLineStack , $ description ) { if ( $ stateLineStack -> getLastStateLine ( ) instanceof StateLineInterface ) { throw new ObjectAlreadyInitializedException ( ) ; } $ pointOfEntry = $ this -> machine -> getPointOfEntry ( ) ; $ stateLine = $ this -> createStateLine ( $ pointOfEntry , $ description ) ; $ stateLineStack -> addStateLine ( $ stateLine ) ; $ this -> machineEventDispatcher -> dispatchInitializationEvents ( $ this -> machine , $ object , $ stateLineStack ) ; return $ stateLineStack ; }
Initialize the object into the machine.

@param mixed          $object         Object
@param StateLineStack $stateLineStack StateLine Stack
@param string         $description    Description

@return StateLineStack StateLine stack given

@throws ObjectAlreadyInitializedException Object already initialized
Initialize the object into the machine .