PoStreamWriter
class PoStreamWriter implements PoWriterInterface, PoStreamInterface (View source)
Defines a Gettext PO stream writer.
Properties
| protected string | $uri | URI of the PO stream that is being written. |
|
| protected PoHeader | $header | The Gettext PO header. |
|
| protected resource | $fd | File handle of the current PO stream. |
|
| protected string | $langcode | The language code of this writer. |
Methods
Gets the current language code used.
Set the language code.
Open the stream. Set the URI for the stream earlier with setURI().
Implements Drupal\Component\Gettext\PoStreamInterface::close().
Implements Drupal\Component\Gettext\PoStreamInterface::getURI().
Set the URI of the PO stream that is going to be read or written.
Details
PoHeader
getHeader()
Gets the PO header of the current stream.
setHeader(PoHeader $header)
Set the PO header for the current stream.
string
getLangcode()
Gets the current language code used.
setLangcode(string $langcode)
Set the language code.
open()
Open the stream. Set the URI for the stream earlier with setURI().
close()
Implements Drupal\Component\Gettext\PoStreamInterface::close().
writeItem(PoItem $item)
Writes the given item.
writeItems(PoReaderInterface $reader, $count = -1)
Writes all or the given amount of items.
URI
getURI()
Implements Drupal\Component\Gettext\PoStreamInterface::getURI().
setURI($uri)
Set the URI of the PO stream that is going to be read or written.