示例#1
0
 /**
  * @param  array  $models
  * @param  string $message
  * @return bool
  */
 private function writeModelFiles(array $models, $message)
 {
     $targetDirectory = $this->getParam('target-dir');
     $numberOfMissingModels = count($models);
     if ($numberOfMissingModels > 0) {
         $this->modelGenerator->writeMissingModelFiles($this->schema, $targetDirectory);
         $this->outputWriter->writeLine($message . $numberOfMissingModels, OutputWriterInterface::LEVEL_LESS_INFO);
         return true;
     }
     return false;
 }
示例#2
0
 /**
  * @return ModelGenerator
  */
 private function createModelGenerator()
 {
     $formatter = $this->getFormatter();
     $modelGenerator = new ModelGenerator($formatter);
     return $modelGenerator->setLicense($this->getLicense(self::EOL))->setEndOfLine(self::EOL)->setAuthor(self::AUTHOR, self::MAIL)->setCreatedOn(self::DATE);
 }