예제 #1
0
파일: DOT.php 프로젝트: KhaosLibrary/Khaos
 /**
  * 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;
 }
예제 #2
0
 public function __construct(StateVisitorClient $state)
 {
     $this->transitions = new SplObjectStorage();
     $state->accept($this);
 }