final class UploadedImage extends UploadedFile (View source)

Extends a persisted upload reference with dimensions verified from the final bitmap bytes.

Methods

__construct(string $storedFilename, string $storedPath, string $storedRelativePath, string $mimeType, int $sizeBytes, int $width, int $height, UploadVisibility $visibility = UploadVisibility::Public, string|null $publicRelativePath = null)

Records the final storage metadata and dimensions of a successfully processed bitmap.

string from UploadedFile

Returns the generated basename used in the selected storage directory.

string
string from UploadedFile

Returns the internal absolute filesystem path intended for trusted application-side operations.

string
string from UploadedFile

Returns the storage-relative identifier below the public or private upload root.

string
string from UploadedFile

Returns the server-detected media type retained after successful validation.

string
int from UploadedFile

Returns the final persisted byte count.

int
UploadVisibility from UploadedFile

Identifies whether the stored upload is publicly published or privately retained.

UploadVisibility
string|null from UploadedFile

Returns the web-root-relative path for public uploads and null for private uploads.

string|null
int
width()

Returns the verified final bitmap width in pixels.

int
int
height()

Returns the verified final bitmap height in pixels.

int

Details

__construct

__construct(string $storedFilename, string $storedPath, string $storedRelativePath, string $mimeType, int $sizeBytes, int $width, int $height, UploadVisibility $visibility = UploadVisibility::Public, string|null $publicRelativePath = null)

Records the final storage metadata and dimensions of a successfully processed bitmap.

Parameters

string $storedFilename
string $storedPath
string $storedRelativePath
string $mimeType
int $sizeBytes
int $width
int $height
UploadVisibility $visibility
string|null $publicRelativePath

storedFilename

string storedFilename()

Returns the generated basename used in the selected storage directory.

Return Value

string

storedPath

string storedPath()

Returns the internal absolute filesystem path intended for trusted application-side operations.

Return Value

string

storedRelativePath

string storedRelativePath()

Returns the storage-relative identifier below the public or private upload root.

Return Value

string

mimeType

string mimeType()

Returns the server-detected media type retained after successful validation.

Return Value

string

sizeBytes

int sizeBytes()

Returns the final persisted byte count.

Return Value

int

visibility

UploadVisibility visibility()

Identifies whether the stored upload is publicly published or privately retained.

Return Value

UploadVisibility

publicRelativePath

string|null publicRelativePath()

Returns the web-root-relative path for public uploads and null for private uploads.

Return Value

string|null

width

int width()

Returns the verified final bitmap width in pixels.

Return Value

int

height

int height()

Returns the verified final bitmap height in pixels.

Return Value

int