FileWriter

Writes the artifacts produced by the font import.

Table of contents

Namespace: Com\Tecnick\Pdf\Font

final class FileWriter

Source: src/FileWriter.php:37

Writes the artifacts produced by the font import.

Methods

write()

Write a font artifact, raising an exception when it cannot be stored in full.

The number of bytes written is compared with the size of the data, and the diagnostic fwrite() emits on failure is captured and carried by the exception message.

public static write(File $fileHelper, string $file, string $data): void

Parameters:

  • $fileHelper (File): File helper used to open the file.
  • $file (string): Full path of the file to write.
  • $data (string): Data to store.

Throws:

Source: src/FileWriter.php:52