function PoStreamWriter::writeItems

Same name in other branches
  1. 9 core/lib/Drupal/Component/Gettext/PoStreamWriter.php \Drupal\Component\Gettext\PoStreamWriter::writeItems()
  2. 8.9.x core/lib/Drupal/Component/Gettext/PoStreamWriter.php \Drupal\Component\Gettext\PoStreamWriter::writeItems()
  3. 10 core/lib/Drupal/Component/Gettext/PoStreamWriter.php \Drupal\Component\Gettext\PoStreamWriter::writeItems()

Overrides PoWriterInterface::writeItems

File

core/lib/Drupal/Component/Gettext/PoStreamWriter.php, line 137

Class

PoStreamWriter
Defines a Gettext PO stream writer.

Namespace

Drupal\Component\Gettext

Code

public function writeItems(PoReaderInterface $reader, $count = -1) {
    $forever = $count == -1;
    while (($count-- > 0 || $forever) && ($item = $reader->readItem())) {
        $this->writeItem($item);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.