Google\Cloud\Dev\DocGenerator\TypeGenerator::write PHP Method

write() public method

public write ( )
    public function write()
    {
        $writer = new Writer(json_encode($this->types), $this->outputPath);
        $writer->write('types.json');
    }

Usage Example

Esempio n. 1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $paths = ['source' => $input->getArgument('source') ? $this->cliBasePath . '/../' . $input->getArgument('source') : $this->cliBasePath . '/../' . self::DEFAULT_SOURCE_DIR, 'output' => $input->getArgument('output') ? $this->cliBasePath . '/../' . $input->getArgument('output') : $this->cliBasePath . '/../' . self::DEFAULT_OUTPUT_DIR];
     $types = new TypeGenerator($paths['output']);
     $sourceFiles = $this->getFilesList($paths['source']);
     $docs = new DocGenerator($types, $sourceFiles, $paths['output'], $this->cliBasePath);
     $docs->generate();
     $types->write();
 }