PAGI\Node\NodeController::jumpTo PHP Method

jumpTo() public method

Runs a node and process the result.
public jumpTo ( string $name ) : void
$name string Node to run.
return void
    public function jumpTo($name)
    {
        if (!isset($this->nodes[$name])) {
            throw new NodeException("Unknown node: {$name}");
        }
        // Cant make this recursive because php does not support tail
        // recursion optimization.
        while ($name !== false) {
            $node = $this->nodes[$name];
            $this->logDebug("Running {$name}");
            $node->run();
            $name = $this->processNodeResult($node);
        }
    }