writeFile() public method

Writes entries to a po file
public writeFile ( string $filepath ) : boolean
$filepath string
return boolean
Exemplo n.º 1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $inFile = new FileHandler($input->getArgument('from'));
     $outFileLocation = $input->getArgument('to');
     $poParser = new PoParser($inFile);
     $messages = $poParser->parse($inFile);
     foreach ($messages as $msgid => $message) {
         $message = $this->translateMessage($message);
         $poParser->setEntry($msgid, $message, false);
     }
     $poParser->writeFile($outFileLocation);
 }