run() public method

public run ( Iterator $iter )
$iter Iterator
Ejemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $graph = new Digraph();
     $logger = new GraphLogger();
     $compil = new Linking(new Builder(), new GraphBuilder($this->fineTuning, $graph, $logger));
     $output->writeln(sprintf("Parsing %d files...", $this->phpfinder->count()));
     $compil->run($this->phpfinder->getIterator());
     $this->writeConfig($logger);
     $output->writeln("Default config {$this->newConfigFile} created");
 }
Ejemplo n.º 2
0
 /**
  * {@inheritDoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $graph = new Digraph();
     $logger = new NullLogger();
     $compil = new Linking(new Builder(), new GraphBuilder($this->fineTuning, $graph, $logger));
     $output->writeln(sprintf("Parsing %d files...", $this->phpfinder->count()));
     $compil->run($this->phpfinder->getIterator());
     $output->writeln(sprintf("Processing digraph with %d vertices and %d edges...", count($graph->getVertexSet()), count($graph->getEdgeSet())));
     $processed = $this->processGraph($graph, $output);
     $ff = new Factory();
     $dumper = $ff->create($processed, $this->reportFormat);
     file_put_contents($this->reportName, $dumper->export());
     $output->writeln("Report {$this->reportName} created");
     if ($output->getVerbosity() == OutputInterface::VERBOSITY_VERBOSE) {
         $output->writeln(sprintf("<comment>%.0f MB used</comment>", memory_get_peak_usage() / 1000000.0));
     }
 }
Ejemplo n.º 3
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $compil = new Linking(new Builder(), new FactoryGenBuilder($this->dumper));
     $compil->run($this->source);
 }
Ejemplo n.º 4
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $compil = new Linking(new Builder(), new ContractorBuilder(new PhpDumper()));
     $compil->run($this->phpfinder->getIterator());
 }