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

File

core/lib/Drupal/Component/Gettext/PoStreamReader.php, line 13

Namespace

Drupal\Component\Gettext

Members

Name Modifiers Type Description
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::$_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 Get header metadata. Overrides PoMetadataInterface::getHeader
PoStreamReader::getLangcode public function Get language code. Overrides PoMetadataInterface::getLangcode
PoStreamReader::getSeek public function Gets the pointer position of the current PO stream.
PoStreamReader::getURI public function Gets the URI of the PO stream that is being read or written. 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 Reads and returns a PoItem (source/translation pair). 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 Set language code. Overrides PoMetadataInterface::setLangcode
PoStreamReader::setSeek public function Sets the seek position for the current PO stream.
PoStreamReader::setURI public function Set the URI of the PO stream that is going to be read or written. Overrides PoStreamInterface::setURI
PoStreamReader::shortenComments private function Generates a short, one-string version of the passed comment array.
doc_Drupal
2016-10-29 09:34:41
Comments
Leave a Comment

Please login to continue.