private function PoStreamWriter::write in Localization update 7.2
Write data to the stream.
Parameters
string $data: Piece of string to write to the stream. If the value is not directly a string, casting will happen in writing.
Throws
Exception If writing the data is not possible.
2 calls to PoStreamWriter::write()
- PoStreamWriter::writeHeader in includes/
gettext/ PoStreamWriter.php - Write the PO header to the stream.
- PoStreamWriter::writeItem in includes/
gettext/ PoStreamWriter.php - Implements PoWriterInterface::writeItem().
File
- includes/
gettext/ PoStreamWriter.php, line 109 - Definition of Drupal\Component\Gettext\PoStreamWriter.
Class
- PoStreamWriter
- Defines a Gettext PO stream writer.
Code
private function write($data) {
$result = fputs($this->_fd, $data);
if ($result === FALSE) {
throw new Exception('Unable to write data: ' . substr($data, 0, 20));
}
}