示例#1
0
 public function validate()
 {
     # run merge and validate of the config options
     parent::validate();
     $writer = $this->getWriter();
     $limit = $writer->getStream()->getLimit();
     $sequence = $writer->getStream()->getSequence();
     $singleFileMode = $this->getOption(self::CONFIG_OPTION_SINGLE_FILE_MODE);
     $outFileFormat = $this->getOption(self::CONFIG_OPTION_OUT_FILE_FORMAT);
     $maxLines = $this->getOption(self::CONFIG_OPTION_MAX_LINES);
     if (!$writer instanceof WriterInterface) {
         throw new EngineException('Writter not been set can not finish merging config');
     }
     if ($singleFileMode === true) {
         # reverse the split on table and remove line limit to keep single file mode.
         $this->setOption(self::CONFIG_OPTION_SPLIT_ON_TABLE, false);
         $this->setOption(self::CONFIG_OPTION_MAX_LINES, null);
         $limit->changeLimit(null);
     } else {
         # set the maxLines
         $limit->changeLimit($maxLines);
     }
     # set output format
     $sequence->setFormat($outFileFormat);
 }
示例#2
0
 public function validate()
 {
     # run merge and validate of the config options
     parent::validate();
     # change the format on the writer to remove the seq number
     # since we are using a single file format
     $writer = $this->getWriter();
     $stream = $writer->getStream();
     # need set big max or file will split
     $stream->getLimit()->changeLimit(null);
     $stream->getSequence()->setFormat($this->getOption(self::CONFIG_OPTION_OUT_FILE_FORMAT));
 }
示例#3
0
 public function validate()
 {
     $this->formatter->validate();
     return true;
 }