public function PoDatabaseReader::readItem in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/locale/src/PoDatabaseReader.php \Drupal\locale\PoDatabaseReader::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/
modules/ locale/ src/ PoDatabaseReader.php, line 167 - Contains \Drupal\locale\PoDatabaseReader.
Class
- PoDatabaseReader
- Gettext PO reader working with the locale module database.
Namespace
Drupal\localeCode
public function readItem() {
if ($string = $this
->readString()) {
$values = (array) $string;
$po_item = new PoItem();
$po_item
->setFromArray($values);
return $po_item;
}
}