PoDatabaseReader::readItem

public 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 162

Class

PoDatabaseReader
Gettext PO reader working with the locale module database.

Namespace

Drupal\locale

Code

public function readItem() {
  if ($string = $this->readString()) {
    $values = (array) $string;
    $po_item = new PoItem();
    $po_item->setFromArray($values);
    return $po_item;
  }
}
doc_Drupal
2016-10-29 09:34:23
Comments
Leave a Comment

Please login to continue.