MediaWiki  REL1_22
MockFileBackend Class Reference

Class simulating a backend store. More...

Inheritance diagram for MockFileBackend:
Collaboration diagram for MockFileBackend:

List of all members.

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

 debug ($msg= '')
 Poor man debugging.
 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)

Protected Attributes

 $mocked = array()

Detailed Description

Class simulating a backend store.

Since:
1.22

Definition at line 31 of file MockFileBackend.php.


Member Function Documentation

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.

Returns:
bool

Reimplemented from FileBackendStore.

Definition at line 118 of file MockFileBackend.php.

References debug().

MockFileBackend::doCopyInternal ( array params) [protected]
See also:
FileBackendStore::copyInternal()
Returns:
Status

Reimplemented from FileBackendStore.

Definition at line 61 of file MockFileBackend.php.

References debug(), and Status\newGood().

MockFileBackend::doCreateInternal ( array params) [protected]
See also:
FileBackendStore::createInternal()
Returns:
Status

Reimplemented from FileBackendStore.

Definition at line 44 of file MockFileBackend.php.

References debug(), and Status\newGood().

Referenced by doStoreInternal().

MockFileBackend::doDeleteInternal ( array params) [protected]
See also:
FileBackendStore::deleteInternal()
Returns:
Status

Reimplemented from FileBackendStore.

Definition at line 69 of file MockFileBackend.php.

References debug(), and Status\newGood().

MockFileBackend::doDirectoryExists ( container,
dir,
array params 
) [protected]
See also:
FileBackendStore::directoryExists()
Parameters:
string$containerResolved container name
string$dirResolved path relative to container
array$params
Returns:
bool|null

Reimplemented from FileBackendStore.

Definition at line 103 of file MockFileBackend.php.

References debug().

MockFileBackend::doGetFileStat ( array params) [protected]
See also:
FileBackendStore::getFileStat()

Reimplemented from FileBackendStore.

Definition at line 76 of file MockFileBackend.php.

References array(), debug(), it, and wfTimestamp().

MockFileBackend::doGetLocalCopyMulti ( array params) [protected]
See also:
FileBackendStore::getLocalCopyMulti()
Returns:
Array

Reimplemented from FileBackendStore.

Definition at line 91 of file MockFileBackend.php.

References array(), as, debug(), wfRandomString(), and wfTempDir().

MockFileBackend::doStoreInternal ( array params) [protected]
See also:
FileBackendStore::storeInternal()
Returns:
Status

Reimplemented from FileBackendStore.

Definition at line 56 of file MockFileBackend.php.

References debug(), and doCreateInternal().

MockFileBackend::getDirectoryListInternal ( container,
dir,
array params 
)

Do not call this function from places outside FileBackend.

See also:
FileBackendStore::getDirectoryList()
Parameters:
string$containerResolved container name
string$dirResolved path relative to container
array$params
Returns:
Traversable|Array|null Returns null on failure

Reimplemented from FileBackendStore.

Definition at line 108 of file MockFileBackend.php.

References array(), and debug().

MockFileBackend::getFileListInternal ( container,
dir,
array params 
)

Do not call this function from places outside FileBackend.

See also:
FileBackendStore::getFileList()
Parameters:
string$containerResolved container name
string$dirResolved path relative to container
array$params
Returns:
Traversable|Array|null Returns null on failure

Reimplemented from FileBackendStore.

Definition at line 113 of file MockFileBackend.php.

References array(), and debug().

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.

Parameters:
string$storagePath
Returns:
bool

Reimplemented from FileBackendStore.

Definition at line 40 of file MockFileBackend.php.


Member Data Documentation

MockFileBackend::$mocked = array() [protected]

Definition at line 33 of file MockFileBackend.php.


The documentation for this class was generated from the following file: