Index

LocalStorage

MMO\edms\storages · 1 symbol · generated 5 Oct 2026

class

LocalStorage

LocalStorage.php:18

The bytes of the files, in a local folder ($folder): a key is a path in it.

class MMO\edms\storages\LocalStorage implements MMO\edms\interfaces\iStorage
Namespace
MMO\edms\storages
Implements
iStorage
The folder belongs outside the web root, the download route being the only way to the files: a warning is logged when it is not, and an apache `.htaccess` refusing every request is written at its root anyway.
$storage = new LocalStorage(); $storage->put('2026/09/0f3a...', $uploadedFilename); $handle = $storage->open('2026/09/0f3a...');

Index

folder
protected
delete($key)
exists($key)
filename($key)
getFolder()
keys()
localFilename($key)
open($key)
protect()Make sure a web server does not send the stored files itself: an apache .htaccess refusing every request, and a warning when the folder is inside the web root, where it does not belong.
put($key, $filename)
size($key)
__construct($folder)

Properties2

folder

string $folder = '{files}'
Type
string

protected

protected bool $protected = false
Type
bool

Methods11

filename($key)

LocalStorage.php:39
function filename(string $key): string
$keystring
returnsstringwhere the bytes of $key are (or would be)
throwsif $key is not a key: a segment starts with a letter or a digit, so none is ..
$storage->filename('2026/09/0f3a'); // '/var/app/files/2026/09/0f3a'

protect()

LocalStorage.php:96

Make sure a web server does not send the stored files itself: an apache .htaccess refusing every request, and a warning when the folder is inside the web root, where it does not belong.

protected function protect(): void
returnsvoid