/** * Convert graph to DOT format * * @param StateVisitorClient $graph * * @return string */ public function toDOT(StateVisitorClient $graph) { $this->reset(); $this->write('digraph machine {'); $graph->accept($this); $this->write('}'); return $this->output; }
public function __construct(StateVisitorClient $state) { $this->transitions = new SplObjectStorage(); $state->accept($this); }