On this page
public function 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\GettextCode
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;
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Component!Gettext!PoStreamReader.php/function/PoStreamReader::readItem/8.1.x