Writer final readonly class
Minn\Media\Writer · public/minn/src/Minn/Media/Writer.php · 24 lines
Where the media library's files live, as a REST upload names them: a stored file's address, its path on disk, and its path relative to the uploads folder. The attachment itself is written through the runtime (wp_handle_upload, wp_insert_attachment, wp_generate_attachment_metadata), as the reference writes it.
Uses 1
Used by 2
Constants and properties
| private | readonly Minn\Media\Uploads $uploads | Promoted from the constructor. |
Public
| new | __construct(Minn\Media\Uploads $uploads)# | |
| method | urlOf(string $relative): string# | A stored file's address. |
| method | pathOf(string $relative): string# | A stored file's path on disk. |
| method | relativeOf(string $absolutePath): ?string# | A stored file's path relative to the uploads folder, or null for one outside it. |
Nothing matches.