PoDatabaseWriter
class PoDatabaseWriter implements PoWriterInterface (View source)
Gettext PO writer working with the locale module database.
Methods
Constructor, initialize reporting array.
Get language code.
Set language code.
Get the report of the write operations.
Set the report array of write operations.
Get the options used by the writer.
Set the options for the current writer.
Details
__construct()
Constructor, initialize reporting array.
string
getLangcode()
Get language code.
setLangcode(string $langcode)
Set language code.
getReport()
Get the report of the write operations.
setReport(array $report = [])
Set the report array of write operations.
getOptions()
Get the options used by the writer.
setOptions(array $options)
Set the options for the current writer.
PoHeader
getHeader()
Get header metadata.
setHeader(PoHeader $header)
Implements Drupal\Component\Gettext\PoMetadataInterface::setHeader().
Sets the header and configure Drupal accordingly.
Before being able to process the given header we need to know in what context this database write is done. For this the options must be set.
A langcode is required to set the current header's PluralForm.
writeItem(PoItem $item)
Writes the given item.
writeItems(PoReaderInterface $reader, $count = -1)
Writes all or the given amount of items.