PoDatabaseWriter::writeItems

public PoDatabaseWriter::writeItems(PoReaderInterface $reader, $count = -1)

Writes all or the given amount of items.

Parameters

PoReaderInterface $reader: Reader to read PoItems from.

$count: Amount of items to read from $reader to write. If -1, all items are read from $reader.

Overrides PoWriterInterface::writeItems

File

core/modules/locale/src/PoDatabaseWriter.php, line 190

Class

PoDatabaseWriter
Gettext PO writer working with the locale module database.

Namespace

Drupal\locale

Code

public function writeItems(PoReaderInterface $reader, $count = -1) {
  $forever = $count == -1;
  while (($count-- > 0 || $forever) && ($item = $reader->readItem())) {
    $this->writeItem($item);
  }
}
doc_Drupal
2016-10-29 09:34:28
Comments
Leave a Comment

Please login to continue.