Documentation

FileStreaming
in package

Represents a class for handling file streaming operations.

Table of Contents

Methods

AsTag()  : string
Converts the content of a file to a tag representation.
AsText()  : string
Converts the content of a file to a text representation.
ToBase64()  : string
Converts a file to its Base64-encoded representation.

Methods

AsTag()

Converts the content of a file to a tag representation.

public static AsTag(string $file[, bool $background = false ]) : string
Parameters
$file : string

The path to the file.

$background : bool = false

Whether the tag should have a background (optional, default is false).

Return values
string

The tag representation.

AsText()

Converts the content of a file to a text representation.

public static AsText(string $file) : string
Parameters
$file : string

The path to the file.

Return values
string

The text content of the file.

ToBase64()

Converts a file to its Base64-encoded representation.

public static ToBase64(string $file) : string
Parameters
$file : string

The path to the file to be converted.

Return values
string

The Base64-encoded content of the file.


        
On this page

Search results