Library Group: media
Generated by php build/docs/rvn-docs.php. Do not edit this file by hand.
| Symbol | Kind | Summary | @return |
| --- | --- | --- | --- |
| allowedExtensions() | function | Returns normalized extension allowlist from config. | array<int, string> |
| deleteAllForPage() | function | Deletes every gallery image row for one page and removes local files. | (No @return.) |
| deleteAvatarFile() | function | Deletes one avatar file and its thumbnail from legacy flat storage. | void |
| deleteImageForPage() | function | Deletes one image row (and variants) and removes its files from local storage. | bool True when the row and all stored files were successfully deleted. |
| filenameForUserString() | function | Builds one deterministic filename from a user-string and extension. | string Canonical avatar filename. |
| maxUploadFilesizeBytes() | function | Resolves max upload size in bytes. | (No @return.) |
| normalizeExtension() | function | Normalizes one extension token to the supported avatar extension set. | string\|null Normalized extension, or null when unsupported. |
| Raven\Lib\Media\AvatarConfig::__construct() | method | (No summary.) | void |
| Raven\Lib\Media\AvatarConfig::allowedExtensionsCsv() | method | Resolves the avatar upload allowlist CSV. | string Raw comma-separated extension allowlist. |
| Raven\Lib\Media\AvatarConfig::allowedExtensionsLabel() | method | Formats the avatar extension allowlist into a concise label. | string Slash-delimited extension label or none. |
| Raven\Lib\Media\AvatarConfig::resolveMaxFilesizeBytes() | method | Resolves the effective avatar max upload size. | int Maximum allowed bytes, or 0 when unlimited. |
| Raven\Lib\Media\AvatarConfig::templateData() | method | Builds template display fields from one stored avatar value. | array{filename: string, url: string, thumb_url: string} |
| Raven\Lib\Media\AvatarConfig::thumbnailFilename() | method | Builds the deterministic thumbnail filename for one avatar. | string Thumbnail filename. |
| Raven\Lib\Media\AvatarConfig::uploadLimitsNote() | method | Builds the avatar upload helper text shown in panel forms. | string Human-readable limits note. |
| Raven\Lib\Media\AvatarDelete::__construct() | method | Prepares the delete helper for the given project root. | void |
| Raven\Lib\Media\AvatarDelete::deleteFile() | method | Deletes one stored avatar file and its thumbnail derivative. | void |
| Raven\Lib\Media\AvatarUpload::storeSanitizedImageUpload() | method | Stores one sanitized image upload without generating avatar thumbnail derivatives. | string\|null null on success, or a user-facing error message on failure. |
| Raven\Lib\Media\AvatarUpload::storeSanitizedUpload() | method | Stores one avatar upload after decode/re-encode metadata stripping. | string\|null null on success, or a user-facing error message on failure. |
| Raven\Lib\Media\AvatarValidator::__construct() | method | (No summary.) | void |
| Raven\Lib\Media\AvatarValidator::validate() | method | Validates one uploaded file payload. | array{ok: bool, error: string\|null, extension: string\|null} |
| Raven\Lib\Media\CoverConfig::publicUrl() | method | Resolves one stored cover-image value to a public URL. | string Same-origin public URL, or empty string for blank/invalid values. |
| Raven\Lib\Media\CoverDelete::__construct() | method | Prepares the delete helper for the given project root. | void |
| Raven\Lib\Media\CoverDelete::deleteFile() | method | Deletes one stored user cover image file. | void |
| Raven\Lib\Media\CoverUpload::recordPayload() | method | Builds persisted cover-image storage columns for one entity update. | array<string, string\|null> |
| Raven\Lib\Media\CoverUpload::storeForUser() | method | Stores one cover image upload for a user and returns the stored relative path. | array{ok: bool, path?: string, error?: string} Result with stored relative path on success. |
| Raven\Lib\Media\CoverValidator::__construct() | method | (No summary.) | void |
| Raven\Lib\Media\CoverValidator::validateUpload() | method | Validates one cover-image upload payload. | array{ok: bool, error: string\|null, extension: string\|null} |
| Raven\Lib\Media\ImageExifProcessor::autoOrient() | method | Applies orientation rotation/flip transforms and resets to top-left. | void |
| Raven\Lib\Media\ImageImagickProcessor::prepareForWrite() | method | Applies EXIF orientation, optional metadata stripping, and output format. | void |
| Raven\Lib\Media\ImageImagickProcessor::readFirstFrame() | method | Reads one uploaded image and normalizes it to the first frame. | Imagick Loaded ImageMagick instance at frame index 0. |
| Raven\Lib\Media\ImageVariantProcessor::__construct() | method | Injects the site configuration for variant dimension resolution. | (No @return.) |
| Raven\Lib\Media\ImageVariantProcessor::resolveVariantSize() | method | (No summary.) | array{width: int, height: int} |
| Raven\Lib\Media\ImageVariantProcessor::variantSpecs() | method | Returns the resolved variant dimension map for the active media config. | array<string, array{width: int, height: int}> Keyed by variant name (sm/md/lg); 0 means auto-axis. |
| Raven\Lib\Media\MediaConfig::__construct() | method | (No summary.) | void |
| Raven\Lib\Media\MediaConfig::resolveMaxFilesizeBytes() | method | Resolves the effective max upload size for a media target. | int Maximum allowed bytes, or 0 when unlimited. |
| Raven\Lib\Media\MediaStorage::__construct() | method | (No summary.) | void |
| Raven\Lib\Media\MediaStorage::absolutePublicPath() | method | Converts a stored relative path into its absolute public filesystem path. | string Absolute filesystem path. |
| Raven\Lib\Media\MediaStorage::deleteStoredPath() | method | Deletes one stored relative file path if it resolves inside gallery storage. | (No @return.) |
| Raven\Lib\Media\MediaStorage::ensurePageDirectory() | method | Ensures the page gallery directory exists. | bool True when the directory exists after the call. |
| Raven\Lib\Media\MediaStorage::pageDirectory() | method | Returns the absolute page gallery directory path for one page id. | string Absolute gallery directory path. |
| Raven\Lib\Media\MediaStorage::removePageDirectory() | method | Removes the page gallery directory when it becomes empty. | void |
| Raven\Lib\Media\MediaStorage::storedPathForFilename() | method | Builds the stored relative path for a page-gallery filename. | string Stored relative path. |
| Raven\Lib\Media\MediaUpload::__construct() | method | Prepares the panel media upload service with split read/write gallery persistence seams. | void |
| Raven\Lib\Media\MediaUpload::uploadForPage() | method | Processes one uploaded image for a page and inserts DB rows for source + variants. | array{ok: bool, image_id?: int, error?: string} |
| Raven\Lib\Media\PreviewConfig::__construct() | method | (No summary.) | void |
| Raven\Lib\Media\PreviewConfig::allowedImageExtensions() | method | Returns configured media upload extensions. | array<int, string> |
| Raven\Lib\Media\PreviewConfig::allowedImageExtensionsLabel() | method | Returns configured extensions as one panel-facing label. | string |
| Raven\Lib\Media\PreviewConfig::imageKeysForSlot() | method | (No summary.) | array<int, string> |
| Raven\Lib\Media\PreviewConfig::imagePathsFromRecord() | method | (No summary.) | array<string, string\|null> |
| Raven\Lib\Media\PreviewConfig::imagePathsFromStoragePayload() | method | (No summary.) | array<string, string\|null> |
| Raven\Lib\Media\PreviewConfig::imageStorageKeysForSlot() | method | (No summary.) | array<int, string> |
| Raven\Lib\Media\PreviewConfig::imageStoragePayloadFromRecord() | method | (No summary.) | array<string, string\|null> |
| Raven\Lib\Media\PreviewConfig::imageVariantSpecs() | method | Returns configured variant sizes. | array<string, array{width: int, height: int}> |
| Raven\Lib\Media\PreviewConfig::maxImageFilesizeKb() | method | Returns configured image max upload size in kilobytes. | int\|null |
| Raven\Lib\Media\PreviewConfig::pathsFromRecord() | method | (No summary.) | array<string, string\|null> |
| Raven\Lib\Media\PreviewConfig::pathsFromStoragePayload() | method | (No summary.) | array<string, string\|null> |
| Raven\Lib\Media\PreviewConfig::removedPaths() | method | (No summary.) | array<int, string> |
| Raven\Lib\Media\PreviewConfig::storageKeysForSlot() | method | (No summary.) | array<int, string> |
| Raven\Lib\Media\PreviewConfig::storagePayloadFromRecord() | method | (No summary.) | array<string, string\|null> |
| Raven\Lib\Media\PreviewConfig::supportsFilenameStorage() | method | Returns true when the entity type stores source filenames instead of full paths. | bool |
| Raven\Lib\Media\PreviewUpload::__construct() | method | Normalizes and stores the active preview slot for this upload helper. | void |
| Raven\Lib\Media\PreviewUpload::recordPayload() | method | Builds persisted preview/icon storage columns for one entity update. | array<string, string\|null> |
| Raven\Lib\Media\PreviewValidator::__construct() | method | (No summary.) | void |
| Raven\Lib\Media\PreviewValidator::validateUpload() | method | Validates one preview/icon upload payload. | array{ok: bool, error: string\|null, extension: string\|null} |
| storageDirectory() | function | Returns the avatar storage directory and creates it when missing. | string Absolute avatar storage directory. |
| storeForUser() | function | Stores one avatar upload for a user and returns the stored relative path. | array{ok: bool, path?: string, error?: string} Result with stored relative path on success. |
| storeSanitizedWithGd() | function | Sanitizes and writes an upload using GD fallback. | string\|null Null on success, otherwise one user-facing error. |
| storeSanitizedWithImagick() | function | Sanitizes and writes an upload using ImageMagick. | string\|null Null on success, otherwise one user-facing error. |
| storeThumbnail() | function | Generates the deterministic avatar thumbnail from one sanitized source. | string\|null Null on success, otherwise one user-facing error. |
| storeThumbnailWithGd() | function | Generates the avatar thumbnail with GD fallback. | string\|null Null on success, otherwise one user-facing error. |
| storeThumbnailWithImagick() | function | Generates the avatar thumbnail with ImageMagick. | string\|null Null on success, otherwise one user-facing error. |
| thumbnailFilename() | function | Builds the deterministic avatar thumbnail filename. | string Thumbnail filename. |
| uploadTransport() | function | Returns the shared upload baseline validator. | Upload |
| userDirectory() | function | Resolves and creates the per-user upload directory for a given user id. | string Absolute path to the user upload directory. |
Parameter Details
allowedExtensions()
- File:
private/lib/Media/MediaUpload.php - Params:
(none)
deleteAllForPage()
- File:
private/lib/Media/MediaUpload.php - Params:
(none)
deleteAvatarFile()
- File:
private/lib/Media/AvatarUpload.php - Params:
string $projectRoot Absolute Raven project root.string $filename Stored avatar filename.
deleteImageForPage()
- File:
private/lib/Media/MediaUpload.php - Params:
int $pageId Page the image belongs to.int $imageId Image record to delete.
filenameForUserString()
- File:
private/lib/Media/AvatarUpload.php - Params:
string $userString User string used as filename stem.string $extension Submitted extension token.
maxUploadFilesizeBytes()
- File:
private/lib/Media/MediaUpload.php - Params:
(none)
normalizeExtension()
- File:
private/lib/Media/AvatarUpload.php - Params:
string $extension Submitted extension token.
Raven\Lib\Media\AvatarConfig::__construct()
- File:
private/lib/Media/AvatarConfig.php - Params:
Config $config Runtime configuration reader.
Raven\Lib\Media\AvatarConfig::allowedExtensionsCsv()
- File:
private/lib/Media/AvatarConfig.php - Params:
(none)
Raven\Lib\Media\AvatarConfig::allowedExtensionsLabel()
- File:
private/lib/Media/AvatarConfig.php - Params:
(none)
Raven\Lib\Media\AvatarConfig::resolveMaxFilesizeBytes()
- File:
private/lib/Media/AvatarConfig.php - Params:
int $defaultBytes Fallback byte limit when config is unset.
Raven\Lib\Media\AvatarConfig::templateData()
- File:
private/lib/Media/AvatarConfig.php - Params:
string $avatarPath Stored avatar path from user row.
Raven\Lib\Media\AvatarConfig::thumbnailFilename()
- File:
private/lib/Media/AvatarConfig.php - Params:
string $filename Avatar source filename.
Raven\Lib\Media\AvatarConfig::uploadLimitsNote()
- File:
private/lib/Media/AvatarConfig.php - Params:
(none)
Raven\Lib\Media\AvatarDelete::__construct()
- File:
private/lib/Media/AvatarDelete.php - Params:
string $projectRoot Absolute project root for filesystem path resolution.
Raven\Lib\Media\AvatarDelete::deleteFile()
- File:
private/lib/Media/AvatarDelete.php - Params:
string $storedPath Stored avatar path or legacy filename from the user row.
Raven\Lib\Media\AvatarUpload::storeSanitizedImageUpload()
- File:
private/lib/Media/AvatarUpload.php - Params:
array<string, mixed> $upload Raw uploaded-file array from PHP superglobal.string $destination Absolute destination path for the stored file.
Raven\Lib\Media\AvatarUpload::storeSanitizedUpload()
- File:
private/lib/Media/AvatarUpload.php - Params:
array<string, mixed> $upload Raw uploaded-file array from PHP superglobal.string $destination Absolute destination path for the stored file.
Raven\Lib\Media\AvatarValidator::__construct()
- File:
private/lib/Media/AvatarValidator.php - Params:
int|null $maxSizeBytes Maximum upload size in bytes.int|null $maxWidth Maximum image width in pixels.int|null $maxHeight Maximum image height in pixels.string|null $allowedExtensionsCsv Comma-separated extension allowlist.
Raven\Lib\Media\AvatarValidator::validate()
- File:
private/lib/Media/AvatarValidator.php - Params:
array<string, mixed> $file One entry from \$_FILES\.
Raven\Lib\Media\CoverConfig::publicUrl()
- File:
private/lib/Media/CoverConfig.php - Params:
string $coverValue Stored local cover-image path.
Raven\Lib\Media\CoverDelete::__construct()
- File:
private/lib/Media/CoverDelete.php - Params:
string $projectRoot Absolute project root for filesystem path resolution.
Raven\Lib\Media\CoverDelete::deleteFile()
- File:
private/lib/Media/CoverDelete.php - Params:
string $storedPath Stored cover path, legacy filename, or external URL from the user row.
Raven\Lib\Media\CoverUpload::recordPayload()
- File:
private/lib/Media/CoverUpload.php - Params:
string $entityType Entity type such as categories/channels/groups/tags.string $filename Stored source filename.array<string, string> $paths Stored source+variant paths.
Raven\Lib\Media\CoverUpload::storeForUser()
- File:
private/lib/Media/CoverUpload.php - Params:
int $userId Numeric user id used as the per-user directory name.array<string, mixed> $upload Validated upload payload from the panel file input.string $extension Submitted or pre-normalized extension token.string $projectRoot Absolute project root for filesystem path resolution.
Raven\Lib\Media\CoverValidator::__construct()
- File:
private/lib/Media/CoverValidator.php - Params:
Config $config Runtime config reader.
Raven\Lib\Media\CoverValidator::validateUpload()
- File:
private/lib/Media/CoverValidator.php - Params:
array<string, mixed> $upload One upload payload from \$_FILES\.
Raven\Lib\Media\ImageExifProcessor::autoOrient()
- File:
private/lib/Media/ImageExifProcessor.php - Params:
Imagick $image Image instance to normalize in place.
Raven\Lib\Media\ImageImagickProcessor::prepareForWrite()
- File:
private/lib/Media/ImageImagickProcessor.php - Params:
Imagick $image Loaded source image instance.string $canonicalExtension Canonical normalized extension (\jpg\, \png\, \gif\).bool $stripExif Whether metadata should be removed from output.ImageExifProcessor $exif EXIF orientation normalizer.
Raven\Lib\Media\ImageImagickProcessor::readFirstFrame()
- File:
private/lib/Media/ImageImagickProcessor.php - Params:
string $tmpPath Absolute temporary upload path.
Raven\Lib\Media\ImageVariantProcessor::__construct()
- File:
private/lib/Media/ImageVariantProcessor.php - Params:
Config $config Site configuration used to read media thumb dimensions.
Raven\Lib\Media\ImageVariantProcessor::resolveVariantSize()
- File:
private/lib/Media/ImageVariantProcessor.php - Params:
(none)
Raven\Lib\Media\ImageVariantProcessor::variantSpecs()
- File:
private/lib/Media/ImageVariantProcessor.php - Params:
(none)
Raven\Lib\Media\MediaConfig::__construct()
- File:
private/lib/Media/MediaConfig.php - Params:
Config $config Runtime configuration reader.
Raven\Lib\Media\MediaConfig::resolveMaxFilesizeBytes()
- File:
private/lib/Media/MediaConfig.php - Params:
string $target Logical target such as \images\.int $defaultBytes Fallback byte limit when config is unset.
Raven\Lib\Media\MediaStorage::__construct()
- File:
private/lib/Media/MediaStorage.php - Params:
string $projectRoot Absolute project root for public upload-path resolution.
Raven\Lib\Media\MediaStorage::absolutePublicPath()
- File:
private/lib/Media/MediaStorage.php - Params:
string $storedPath Stored relative path.
Raven\Lib\Media\MediaStorage::deleteStoredPath()
- File:
private/lib/Media/MediaStorage.php - Params:
(none)
Raven\Lib\Media\MediaStorage::ensurePageDirectory()
- File:
private/lib/Media/MediaStorage.php - Params:
int $pageId Owning page id.
Raven\Lib\Media\MediaStorage::pageDirectory()
- File:
private/lib/Media/MediaStorage.php - Params:
int $pageId Owning page id.
Raven\Lib\Media\MediaStorage::removePageDirectory()
- File:
private/lib/Media/MediaStorage.php - Params:
int $pageId Owning page id.
Raven\Lib\Media\MediaStorage::storedPathForFilename()
- File:
private/lib/Media/MediaStorage.php - Params:
int $pageId Owning page id.string $filename Gallery filename.
Raven\Lib\Media\MediaUpload::__construct()
- File:
private/lib/Media/MediaUpload.php - Params:
Config $config Runtime config used for upload-policy and variant settings.InputSanitizer $input Input normalizer used for stored image metadata fields.MediaRead $mediaRead Read-side media persistence for duplicate checks and ordering.MediaWrite $mediaWrite Write-side media persistence for insert/delete workflows.string $projectRoot Absolute Raven project root used for upload-path resolution.
Raven\Lib\Media\MediaUpload::uploadForPage()
- File:
private/lib/Media/MediaUpload.php - Params:
array<string, mixed>|null $upload
Raven\Lib\Media\PreviewConfig::__construct()
- File:
private/lib/Media/PreviewConfig.php - Params:
Config $config Runtime config reader for media policy lookups.
Raven\Lib\Media\PreviewConfig::allowedImageExtensions()
- File:
private/lib/Media/PreviewConfig.php - Params:
(none)
Raven\Lib\Media\PreviewConfig::allowedImageExtensionsLabel()
- File:
private/lib/Media/PreviewConfig.php - Params:
(none)
Raven\Lib\Media\PreviewConfig::imageKeysForSlot()
- File:
private/lib/Media/PreviewConfig.php - Params:
(none)
Raven\Lib\Media\PreviewConfig::imagePathsFromRecord()
- File:
private/lib/Media/PreviewConfig.php - Params:
array<string, mixed>|null $record
Raven\Lib\Media\PreviewConfig::imagePathsFromStoragePayload()
- File:
private/lib/Media/PreviewConfig.php - Params:
array<string, mixed> $storage
Raven\Lib\Media\PreviewConfig::imageStorageKeysForSlot()
- File:
private/lib/Media/PreviewConfig.php - Params:
(none)
Raven\Lib\Media\PreviewConfig::imageStoragePayloadFromRecord()
- File:
private/lib/Media/PreviewConfig.php - Params:
array<string, mixed>|null $record
Raven\Lib\Media\PreviewConfig::imageVariantSpecs()
- File:
private/lib/Media/PreviewConfig.php - Params:
(none)
Raven\Lib\Media\PreviewConfig::maxImageFilesizeKb()
- File:
private/lib/Media/PreviewConfig.php - Params:
(none)
Raven\Lib\Media\PreviewConfig::pathsFromRecord()
- File:
private/lib/Media/PreviewConfig.php - Params:
array<string, mixed>|null $record
Raven\Lib\Media\PreviewConfig::pathsFromStoragePayload()
- File:
private/lib/Media/PreviewConfig.php - Params:
array<string, mixed> $storage
Raven\Lib\Media\PreviewConfig::removedPaths()
- File:
private/lib/Media/PreviewConfig.php - Params:
array<string, string|null> $currentPathsarray<string, string|null> $nextPaths
Raven\Lib\Media\PreviewConfig::storageKeysForSlot()
- File:
private/lib/Media/PreviewConfig.php - Params:
(none)
Raven\Lib\Media\PreviewConfig::storagePayloadFromRecord()
- File:
private/lib/Media/PreviewConfig.php - Params:
array<string, mixed>|null $record
Raven\Lib\Media\PreviewConfig::supportsFilenameStorage()
- File:
private/lib/Media/PreviewConfig.php - Params:
string $taxonomyType Entity type such as categories/channels/groups/tags.
Raven\Lib\Media\PreviewUpload::__construct()
- File:
private/lib/Media/PreviewUpload.php - Params:
string $slot Upload slot name.
Raven\Lib\Media\PreviewUpload::recordPayload()
- File:
private/lib/Media/PreviewUpload.php - Params:
string $entityType Entity type such as categories/channels/groups/tags.string $filename Stored source filename.array<string, string> $paths Stored source+variant paths.
Raven\Lib\Media\PreviewValidator::__construct()
- File:
private/lib/Media/PreviewValidator.php - Params:
Config $config Runtime config reader.
Raven\Lib\Media\PreviewValidator::validateUpload()
- File:
private/lib/Media/PreviewValidator.php - Params:
array<string, mixed> $upload One upload payload from \$_FILES\.
storageDirectory()
- File:
private/lib/Media/AvatarUpload.php - Params:
string $projectRoot Absolute Raven project root.
storeForUser()
- File:
private/lib/Media/AvatarUpload.php - Params:
int $userId Numeric user id used as the per-user directory name.array<string, mixed> $upload Validated upload payload from the panel file input.string $extension Submitted or pre-normalized extension token.string $projectRoot Absolute project root for filesystem path resolution.
storeSanitizedWithGd()
- File:
private/lib/Media/AvatarUpload.php - Params:
string $tmpPath Uploaded temporary file path.string $destination Destination path for sanitized output.string $extension Target file extension.
storeSanitizedWithImagick()
- File:
private/lib/Media/AvatarUpload.php - Params:
string $tmpPath Uploaded temporary file path.string $destination Destination path for sanitized output.string $extension Target file extension.
storeThumbnail()
- File:
private/lib/Media/AvatarUpload.php - Params:
string $sourcePath Source avatar path.string $destination Thumbnail destination path.
storeThumbnailWithGd()
- File:
private/lib/Media/AvatarUpload.php - Params:
string $sourcePath Source avatar path.string $destination Thumbnail destination path.
storeThumbnailWithImagick()
- File:
private/lib/Media/AvatarUpload.php - Params:
string $sourcePath Source avatar path.string $destination Thumbnail destination path.
thumbnailFilename()
- File:
private/lib/Media/AvatarUpload.php - Params:
string $filename Source avatar filename.
uploadTransport()
- File:
private/lib/Media/AvatarUpload.php - Params:
(none)
userDirectory()
- File:
private/lib/Media/AvatarUpload.php - Params:
int $userId Numeric user id used as the directory name segment.string $projectRoot Absolute project root.