class PoStreamReader

Implements Gettext PO stream reader.

The PO file format parsing is implemented according to the documentation at http://www.gnu.org/software/gettext/manual/gettext.html#PO-Files

Hierarchy

Expanded class hierarchy of PoStreamReader

1 file declares its use of PoStreamReader

File

drupal/core/lib/Drupal/Component/Gettext/PoStreamReader.php, line 20
Definition of Drupal\Component\Gettext\PoStreamReader.

Namespace

Drupal\Component\Gettext
View source

Members

Namesort descending Modifiers Type Description Overrides
PoStreamReader::$_context private property Parser context for the stream reader state machine.
PoStreamReader::$_current_item private property Current entry being read. Incomplete.
PoStreamReader::$_current_plural_index private property Current plural index for plural translations.
PoStreamReader::$_errors private property Array of translated error strings recorded on reading this stream so far.
PoStreamReader::$_fd private property File handle of the current PO stream.
PoStreamReader::$_finished private property Indicator of whether the stream reading is finished.
PoStreamReader::$_header private property The PO stream header.
PoStreamReader::$_langcode private property Language code for the PO stream being read.
PoStreamReader::$_last_item private property Object wrapper for the last read source/translation pair.
PoStreamReader::$_line_number private property Source line number of the stream being parsed.
PoStreamReader::$_size private property Size of the current PO stream.
PoStreamReader::$_uri private property URI of the PO stream that is being read.
PoStreamReader::close public function Implements Drupal\Component\Gettext\PoStreamInterface::close(). Overrides PoStreamInterface::close
PoStreamReader::getHeader public function Implements Drupal\Component\Gettext\PoMetadataInterface::getHeader(). Overrides PoMetadataInterface::getHeader
PoStreamReader::getLangcode public function Implements Drupal\Component\Gettext\PoMetadataInterface::getLangcode(). Overrides PoMetadataInterface::getLangcode
PoStreamReader::getSeek public function Returns the pointer position of the current PO stream.
PoStreamReader::getURI public function Implements Drupal\Component\Gettext\PoStreamInterface::getURI(). Overrides PoStreamInterface::getURI
PoStreamReader::open public function Implements Drupal\Component\Gettext\PoStreamInterface::open(). Overrides PoStreamInterface::open
PoStreamReader::parseQuoted function Parses a string in quotes.
PoStreamReader::readHeader private function Read the header from the PO stream.
PoStreamReader::readItem public function Implements Drupal\Component\Gettext\PoReaderInterface::readItem(). Overrides PoReaderInterface::readItem
PoStreamReader::readLine private function Reads a line from the PO stream and stores data internally.
PoStreamReader::setHeader public function Implements Drupal\Component\Gettext\PoMetadataInterface::setHeader(). Overrides PoMetadataInterface::setHeader
PoStreamReader::setItemFromArray public function Store the parsed values as a PoItem object.
PoStreamReader::setLangcode public function Implements Drupal\Component\Gettext\PoMetadataInterface::setLangcode(). Overrides PoMetadataInterface::setLangcode
PoStreamReader::setSeek public function Sets the seek position for the current PO stream.
PoStreamReader::setURI public function Implements Drupal\Component\Gettext\PoStreamInterface::setURI(). Overrides PoStreamInterface::setURI
PoStreamReader::shortenComments private function Generates a short, one-string version of the passed comment array.