It is a kind of director, but with directors and eventually it is a Facade
/** * {@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"); }
/** * {@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)); } }
protected function execute(InputInterface $input, OutputInterface $output) { $compil = new Linking(new Builder(), new FactoryGenBuilder($this->dumper)); $compil->run($this->source); }
protected function execute(InputInterface $input, OutputInterface $output) { $compil = new Linking(new Builder(), new ContractorBuilder(new PhpDumper())); $compil->run($this->phpfinder->getIterator()); }