Esempio n. 1
0
 /**
  *  Compile a Composite
  *
  *  @access public
  *  @param CompositeInterface $composite
  */
 public function compile(CompositeInterface $composite)
 {
     $composite->acceptVisitor($this->graphVisitor);
     $this->setGraph($this->graphVisitor->getResult());
     foreach ($this->passes as $pass) {
         $pass->process($composite, $this);
     }
     return $composite;
 }
Esempio n. 2
0
 protected function buildDirectedGraph(CompositeInterface $com)
 {
     $visitor = new DirectedGraphVisitor(new DirectedGraph(), new PathBuilder());
     $com->acceptVisitor($visitor);
     return $visitor->getResult();
 }
 /**
  *  Will inject Cache into the composite
  *
  *  The References should be valid as
  *  missing ones will not cause error, run KeysExistPass first
  *
  *  @param CompositeInterface $composite
  *  @param Compiler $cmp
  */
 public function process(CompositeInterface $composite, CompilerInterface $cmp)
 {
     $composite->acceptVisitor($this->visitor);
 }