PoStreamReader::readItem

public PoStreamReader::readItem()

Reads and returns a PoItem (source/translation pair).

Return value

\Drupal\Component\Gettext\PoItem Wrapper for item data instance.

Overrides PoReaderInterface::readItem

File

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

Class

PoStreamReader
Implements Gettext PO stream reader.

Namespace

Drupal\Component\Gettext

Code

1
2
3
4
5
6
7
8
9
10
11
public function readItem() {
  // Clear out the last item.
  $this->_last_item = NULL;
 
  // Read until finished with the stream or a complete item was identified.
  while (!$this->_finished && is_null($this->_last_item)) {
    $this->readLine();
  }
 
  return $this->_last_item;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.