public function compile()
    {
        $nodesVisited = [];

        /**
         * Checking the configuration.
         */
        $this
            ->checkTransitionsConfiguration($this->configuration)
            ->checkPointOfEntry(
                $this->configuration,
                $this->pointOfEntry
            )
            ->checkCycles(
                $this->configuration,
                $this->pointOfEntry,
                $nodesVisited
            );

        /**
         * Once checked we compile the structure.
         */
        $this->transitionChain = $this->compileTransitions($this->configuration);

        /**
         * We check the compilation.
         */
        $this
            ->checkTransitionDuplicates($this->transitionChain)
            ->checkStates($this->transitionChain);

        $machine = $this
            ->machineFactory
            ->generate(
                $this->machineId,
                $this->transitionChain,
                $this->pointOfEntry
            );

        return $machine;
    }
public function compile()
    {
        $nodesVisited = [];

        /**
         * Checking the configuration.
         */
        $this
            ->checkTransitionsConfiguration($this->configuration)
            ->checkPointOfEntry(
                $this->configuration,
                $this->pointOfEntry
            )
            ->checkCycles(
                $this->configuration,
                $this->pointOfEntry,
                $nodesVisited
            );

        /**
         * Once checked we compile the structure.
         */
        $this->transitionChain = $this->compileTransitions($this->configuration);

        /**
         * We check the compilation.
         */
        $this
            ->checkTransitionDuplicates($this->transitionChain)
            ->checkStates($this->transitionChain);

        $machine = $this
            ->machineFactory
            ->generate(
                $this->machineId,
                $this->transitionChain,
                $this->pointOfEntry
            );

        return $machine;
    }
public function compile ( ) { $ nodesVisited = [ ] ; /**
         * Checking the configuration.
         */ $ this -> checkTransitionsConfiguration ( $ this -> configuration ) -> checkPointOfEntry ( $ this -> configuration , $ this -> pointOfEntry ) -> checkCycles ( $ this -> configuration , $ this -> pointOfEntry , $ nodesVisited ) ; /**
         * Once checked we compile the structure.
         */ $ this -> transitionChain = $ this -> compileTransitions ( $ this -> configuration ) ; /**
         * We check the compilation.
         */ $ this -> checkTransitionDuplicates ( $ this -> transitionChain ) -> checkStates ( $ this -> transitionChain ) ; $ machine = $ this -> machineFactory -> generate ( $ this -> machineId , $ this -> transitionChain , $ this -> pointOfEntry ) ; return $ machine ; }
Compile machine.

@throws TransitionNotValidException                  Transition not valid
@throws StateNotValidException                       state is not valid
@throws CyclesNotAllowedException                    Cycles found not allowed
@throws InvalidPointOfEntryException                 Invalid point of entry
@throws InconsistentTransitionConfigurationException Duplicated pair of
state-transition
Compile machine .