Exemple #1
0
 /**
  * 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;
 }
Exemple #2
0
 public function __construct(StateVisitorClient $state)
 {
     $this->transitions = new SplObjectStorage();
     $state->accept($this);
 }