You are here

public function PoStreamReader::readItem in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Component/Gettext/PoStreamReader.php \Drupal\Component\Gettext\PoStreamReader::readItem()
  2. 9 core/lib/Drupal/Component/Gettext/PoStreamReader.php \Drupal\Component\Gettext\PoStreamReader::readItem()

File

core/lib/Drupal/Component/Gettext/PoStreamReader.php, line 180

Class

PoStreamReader
Implements Gettext PO stream reader.

Namespace

Drupal\Component\Gettext

Code

public function readItem() {

  // Clear out the last item.
  $this->lastItem = NULL;

  // Read until finished with the stream or a complete item was identified.
  while (!$this->finished && is_null($this->lastItem)) {
    $this
      ->readLine();
  }
  return $this->lastItem;
}