PoStreamReader::setHeader

public PoStreamReader::setHeader(PoHeader $header) Implements Drupal\Component\Gettext\PoMetadataInterface::setHeader(). Not applicable to stream reading and therefore not implemented. Overrides PoMetadataInterface::setHeader File core/lib/Drupal/Component/Gettext/PoStreamReader.php, line 126 Class PoStreamReader Implements Gettext PO stream reader. Namespace Drupal\Component\Gettext Code public function setHeader(PoHeader $header) { }

PoStreamReader::readLine

private PoStreamReader::readLine() Reads a line from the PO stream and stores data internally. Expands $this->_current_item based on new data for the current item. If this line ends the current item, it is saved with setItemFromArray() with data from $this->_current_item. An internal state machine is maintained in this reader using $this->_context as the reading state. PO items are in between COMMENT states (when items have at least one line or comment in between them) or indicated by

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 public function readItem() { // Clear out the last item. $this->_last_item = NULL; // Read until finished wit

PoStreamReader::readHeader

private PoStreamReader::readHeader() Read the header from the PO stream. The header is a special case PoItem, using the empty string as source and key-value pairs as translation. We just reuse the item reader logic to read the header. File core/lib/Drupal/Component/Gettext/PoStreamReader.php, line 216 Class PoStreamReader Implements Gettext PO stream reader. Namespace Drupal\Component\Gettext Code private function readHeader() { $item = $this->readItem(); // Handle the case prop

PoStreamReader::parseQuoted

PoStreamReader::parseQuoted($string) Parses a string in quotes. Parameters $string: A string specified with enclosing quotes. Return value The string parsed from inside the quotes. File core/lib/Drupal/Component/Gettext/PoStreamReader.php, line 550 Class PoStreamReader Implements Gettext PO stream reader. Namespace Drupal\Component\Gettext Code function parseQuoted($string) { if (substr($string, 0, 1) != substr($string, -1, 1)) { // Start and end quotes must be the same. re

PoStreamReader::open

public PoStreamReader::open() Implements Drupal\Component\Gettext\PoStreamInterface::open(). Opens the stream and reads the header. The stream is ready for reading items after. Throws Exception If the URI is not yet set. Overrides PoStreamInterface::open File core/lib/Drupal/Component/Gettext/PoStreamReader.php, line 152 Class PoStreamReader Implements Gettext PO stream reader. Namespace Drupal\Component\Gettext Code public function open() { if (!empty($this->_uri)) { $this-&

PoStreamReader::getURI

public PoStreamReader::getURI() Gets the URI of the PO stream that is being read or written. Return value URI string for this stream. Overrides PoStreamInterface::getURI File core/lib/Drupal/Component/Gettext/PoStreamReader.php, line 132 Class PoStreamReader Implements Gettext PO stream reader. Namespace Drupal\Component\Gettext Code public function getURI() { return $this->_uri; }

PoStreamReader::getSeek

public PoStreamReader::getSeek() Gets the pointer position of the current PO stream. File core/lib/Drupal/Component/Gettext/PoStreamReader.php, line 205 Class PoStreamReader Implements Gettext PO stream reader. Namespace Drupal\Component\Gettext Code public function getSeek() { return ftell($this->_fd); }

PoStreamReader::getLangcode

public PoStreamReader::getLangcode() Get language code. Return value string Language code string. Overrides PoMetadataInterface::getLangcode File core/lib/Drupal/Component/Gettext/PoStreamReader.php, line 103 Class PoStreamReader Implements Gettext PO stream reader. Namespace Drupal\Component\Gettext Code public function getLangcode() { return $this->_langcode; }

PoStreamReader::getHeader

public PoStreamReader::getHeader() Get header metadata. Return value \Drupal\Component\Gettext\PoHeader $header Header instance representing metadata in a PO header. Overrides PoMetadataInterface::getHeader File core/lib/Drupal/Component/Gettext/PoStreamReader.php, line 117 Class PoStreamReader Implements Gettext PO stream reader. Namespace Drupal\Component\Gettext Code public function getHeader() { return $this->_header; }