private function Generic::write in Add to Cal 8
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.
1 call to Generic::write()
- Generic::generateStructure in src/
Plugin/ AddToCal/ Type/ Generic.php - Generates an ICS file for download
File
- src/
Plugin/ AddToCal/ Type/ Generic.php, line 95
Class
- Generic
- Provides generic calendar type (ics).
Namespace
Drupal\addtocal\Plugin\AddToCal\TypeCode
private function write($data) {
$result = fputs($this->_fd, $data);
if ($result === FALSE) {
throw new Exception('Unable to write data: ' . substr($data, 0, 20));
}
}