Table of contents
Final: Yes
File: FileWriter.php line 37
Writes the artifacts produced by the font import.
Tags
since: 2026-08-14
category: Library
author: Nicola Asuni info@tecnick.com
copyright: 2011-2026 Nicola Asuni - Tecnick.com LTD
license: https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE)
write() : void: Write a font artifact, raising an exception when it cannot be stored in full.
Methods
write()
File: FileWriter.php line 56
public static write(File $fileHelper, string $file, string $data) : void
A short write (full disk, exceeded quota, failing stream) leaves a truncated artifact behind, so the number of bytes written is compared with the size of the data.
fwrite() reports why the stream refused the data as a diagnostic (a notice for a failing file descriptor, a warning for the stream wrappers) before returning false. That reason is captured and carried by the exception.
Parameters
- $fileHelper : File: File helper used to open the file.
- $file : string: Full path of the file to write.
- $data : string: Data to store.
Tags
- throws: Exception if the file cannot be opened.
- throws: Exception if the data cannot be stored in full.