FileWriter

Writes the artifacts produced by the font import.

Table of contents

ComTecnickPdfFont

Final: Yes

File: FileWriter.php line 37

Writes the artifacts produced by the font import.

Tags

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.
 

© 2004-2026 – Nicola Asuni - Tecnick.com - All rights reserved.
sponsor - legal notice - privacy