class PoDatabaseReader implements PoReaderInterface (View source)

Gettext PO reader working with the locale module database.

Methods

__construct()

Constructor, initializes with default options.

string
getLangcode()

Get language code.

setLangcode(string $langcode)

Set language code.

getOptions()

Get the options used by the reader.

setOptions(array $options)

Set the options for the current reader.

getHeader()

Get header metadata.

setHeader(PoHeader $header)

Implements Drupal\Component\Gettext\PoMetadataInterface::setHeader().

readItem()

Reads and returns a PoItem (source/translation pair).

Details

__construct()

Constructor, initializes with default options.

string getLangcode()

Get language code.

Return Value

string

Language code string.

setLangcode(string $langcode)

Set language code.

Parameters

string $langcode

Language code string.

getOptions()

Get the options used by the reader.

setOptions(array $options)

Set the options for the current reader.

Parameters

array $options

PoHeader getHeader()

Get header metadata.

Return Value

PoHeader

Header instance representing metadata in a PO header.

setHeader(PoHeader $header)

Implements Drupal\Component\Gettext\PoMetadataInterface::setHeader().

Parameters

PoHeader $header

Header object representing metadata in a PO header.

Exceptions

Exception

PoItem readItem()

Reads and returns a PoItem (source/translation pair).

Return Value

PoItem

Wrapper for item data instance.