Esempio n. 1
0
 /**
  * @return \Fhaculty\Graph\Set\Vertices In work order to respect constraints
  */
 public function run()
 {
     parent::run();
     $this->outputGraph();
     $this->logger->log(LogLevel::INFO, 'Producing topological sort for dependency order');
     $vertices = $this->graph->topologicalSort();
     $this->outputVertices($vertices);
     return $vertices;
 }
Esempio n. 2
0
 /**
  * @return void
  * @throws Exception
  */
 public function run()
 {
     parent::run();
     if (!isset($this->vertices)) {
         throw new Exception('Cannot run join pass without a set of vertices to run on');
     }
     foreach ($this->vertices as $vertex) {
         /* @var $vertex Vertex */
         if ($vertex->getId() == $this->graph->getRoot()) {
             if (!$this->includeRoot) {
                 continue;
             }
         }
         $walk = $this->getWalkForVertex($vertex);
         $this->action->process($walk);
     }
 }