MediaWiki
REL1_24
|
Simulation of a backend storage in memory. More...
Public Member Functions | |
getDirectoryListInternal ($container, $dir, array $params) | |
Do not call this function from places outside FileBackend. | |
getFileListInternal ($container, $dir, array $params) | |
Do not call this function from places outside FileBackend. | |
isPathUsableInternal ($storagePath) | |
Check if a file can be created or changed at a given storage path. | |
Protected Member Functions | |
directoriesAreVirtual () | |
Is this a key/value store where directories are just virtual? Virtual directories exists in so much as files exists that are prefixed with the directory path followed by a forward slash. | |
doCopyInternal (array $params) | |
doCreateInternal (array $params) | |
doDeleteInternal (array $params) | |
doDirectoryExists ($container, $dir, array $params) | |
doGetFileStat (array $params) | |
doGetLocalCopyMulti (array $params) | |
doStoreInternal (array $params) | |
doStreamFile (array $params) | |
resolveHashKey ($storagePath) | |
Get the absolute file system path for a storage path. | |
Protected Attributes | |
array | $files = array() |
Map of (file path => (data,mtime) *. |
Simulation of a backend storage in memory.
All data in the backend is automatically deleted at the end of PHP execution. Since the data stored here is volatile, this is only useful for staging or testing.
Definition at line 34 of file MemoryFileBackend.php.
MemoryFileBackend::directoriesAreVirtual | ( | ) | [protected] |
Is this a key/value store where directories are just virtual? Virtual directories exists in so much as files exists that are prefixed with the directory path followed by a forward slash.
Reimplemented from FileBackendStore.
Definition at line 255 of file MemoryFileBackend.php.
MemoryFileBackend::doCopyInternal | ( | array $ | params | ) | [protected] |
array | $params |
Reimplemented from FileBackendStore.
Definition at line 86 of file MemoryFileBackend.php.
References array(), empty, files, Status\newGood(), resolveHashKey(), and wfTimestamp().
MemoryFileBackend::doCreateInternal | ( | array $ | params | ) | [protected] |
array | $params |
Reimplemented from FileBackendStore.
Definition at line 41 of file MemoryFileBackend.php.
References array(), files, Status\newGood(), resolveHashKey(), and wfTimestamp().
MemoryFileBackend::doDeleteInternal | ( | array $ | params | ) | [protected] |
array | $params |
Reimplemented from FileBackendStore.
Definition at line 119 of file MemoryFileBackend.php.
References empty, files, Status\newGood(), and resolveHashKey().
MemoryFileBackend::doDirectoryExists | ( | $ | container, |
$ | dir, | ||
array $ | params | ||
) | [protected] |
string | $container | Resolved container name |
string | $dir | Resolved path relative to container |
array | $params |
Reimplemented from FileBackendStore.
Definition at line 196 of file MemoryFileBackend.php.
MemoryFileBackend::doGetFileStat | ( | array $ | params | ) | [protected] |
Reimplemented from FileBackendStore.
Definition at line 142 of file MemoryFileBackend.php.
References array(), files, and resolveHashKey().
MemoryFileBackend::doGetLocalCopyMulti | ( | array $ | params | ) | [protected] |
array | $params |
Reimplemented from FileBackendStore.
Reimplemented in MockFileBackend.
Definition at line 158 of file MemoryFileBackend.php.
References $ext, array(), as, FileBackend\extensionFromPath(), TempFSFile\factory(), files, and resolveHashKey().
MemoryFileBackend::doStoreInternal | ( | array $ | params | ) | [protected] |
array | $params |
Reimplemented from FileBackendStore.
Definition at line 59 of file MemoryFileBackend.php.
References array(), files, Status\newGood(), resolveHashKey(), wfRestoreWarnings(), wfSuppressWarnings(), and wfTimestamp().
MemoryFileBackend::doStreamFile | ( | array $ | params | ) | [protected] |
array | $params |
Reimplemented from FileBackendStore.
Definition at line 181 of file MemoryFileBackend.php.
References files, Status\newGood(), print, and resolveHashKey().
MemoryFileBackend::getDirectoryListInternal | ( | $ | container, |
$ | dir, | ||
array $ | params | ||
) |
Do not call this function from places outside FileBackend.
string | $container | Resolved container name |
string | $dir | Resolved path relative to container |
array | $params |
Reimplemented from FileBackendStore.
Definition at line 207 of file MemoryFileBackend.php.
References $dir, $dirs, $path, array(), as, empty, and files.
MemoryFileBackend::getFileListInternal | ( | $ | container, |
$ | dir, | ||
array $ | params | ||
) |
Do not call this function from places outside FileBackend.
string | $container | Resolved container name |
string | $dir | Resolved path relative to container |
array | $params |
Reimplemented from FileBackendStore.
Definition at line 236 of file MemoryFileBackend.php.
MemoryFileBackend::isPathUsableInternal | ( | $ | storagePath | ) |
Check if a file can be created or changed at a given storage path.
FS backends should check if the parent directory exists, files can be written under it, and that any file already there is writable. Backends using key/value stores should check if the container exists.
string | $storagePath |
Reimplemented from FileBackendStore.
Definition at line 37 of file MemoryFileBackend.php.
MemoryFileBackend::resolveHashKey | ( | $ | storagePath | ) | [protected] |
Get the absolute file system path for a storage path.
string | $storagePath | Storage path |
Definition at line 265 of file MemoryFileBackend.php.
Referenced by doCopyInternal(), doCreateInternal(), doDeleteInternal(), doGetFileStat(), doGetLocalCopyMulti(), doStoreInternal(), and doStreamFile().
Map of (file path => (data,mtime) *.
Definition at line 35 of file MemoryFileBackend.php.
Referenced by getFileListInternal().