WordPress\AiClient\Files\DTO

File::__constructpublicWP 0.1.0

Constructor.

Method of the class: File{}

No Hooks.

Returns

null. Nothing (null).

Usage

$File = new File();
$File->__construct( $file, ?string $mimeType );
$file(string) (required)
The file string (URL, base64 data, or local path).
?string $mimeType
.
Default: null

Changelog

Since 0.1.0 Introduced.

File::__construct() code WP 7.0

public function __construct(string $file, ?string $mimeType = null)
{
    // Detect and process the file type (will set MIME type if possible)
    $this->detectAndProcessFile($file, $mimeType);
}