Inherits FileRepo.
Public Member Functions | |
__construct ($info) | |
storeBatch ($triplets, $flags=0) | |
Store a batch of files. | |
storeTemp ($originalName, $srcPath) | |
Pick a random name in the temp zone and store a file to it. | |
append ($srcPath, $toAppendPath, $flags=0) | |
Append the contents of the source path to the given file. | |
publishBatch ($triplets, $flags=0) | |
Publish a batch of files. | |
deleteBatch ($sourceDestPairs) | |
Move a group of files to the deletion archive. | |
fileExistsBatch ($files, $flags=0) | |
Checks existence of an array of files. | |
getFileProps ($virtualUrl) | |
Get properties of a file with a given virtual URL The virtual URL must refer to this repo Properties should ultimately be obtained via File::getPropsFromPath(). | |
newFile ($title, $time=false) | |
Create a new File object from the local repository. | |
findFile ($title, $options=array()) | |
Find an instance of the named file created at the specified time Returns false if the file does not exist. |
Definition at line 7 of file NullRepo.php.
NullRepo::__construct | ( | $ | info | ) |
NullRepo::append | ( | $ | srcPath, | |
$ | toAppendPath, | |||
$ | flags = 0 | |||
) |
Append the contents of the source path to the given file.
$srcPath | string location of the source file | |
$toAppendPath | string path to append to. | |
$flags | Bitfield, may be FileRepo::DELETE_SOURCE to indicate that the source file should be deleted if possible |
Reimplemented from FileRepo.
Definition at line 17 of file NullRepo.php.
NullRepo::deleteBatch | ( | $ | sourceDestPairs | ) |
Move a group of files to the deletion archive.
If no valid deletion archive is configured, this may either delete the file or throw an exception, depending on the preference of the repository.
The overwrite policy is determined by the repository -- currently FSRepo assumes a naming scheme in the deleted zone based on content hash, as opposed to the public zone which is assumed to be unique.
array | $sourceDestPairs Array of source/destination pairs. Each element is a two-element array containing the source file path relative to the public root in the first element, and the archive file path relative to the deleted zone root in the second element. |
Reimplemented from FileRepo.
Definition at line 23 of file NullRepo.php.
NullRepo::fileExistsBatch | ( | $ | files, | |
$ | flags = 0 | |||
) |
Checks existence of an array of files.
array | $files URLs (or paths) of files to check | |
integer | $flags Bitwise combination of the following flags: self::FILES_ONLY Mark file as existing only if it is a file (not directory) |
Reimplemented from FileRepo.
Definition at line 26 of file NullRepo.php.
NullRepo::findFile | ( | $ | title, | |
$ | options = array() | |||
) |
Find an instance of the named file created at the specified time Returns false if the file does not exist.
Repositories not supporting version control should return false if the time is specified.
mixed | $title Title object or string | |
$options | Associative array of options: time: requested time for an archived image, or false for the current version. An image object will be returned which was created at the specified time. |
private: If true, return restricted (deleted) files if the current user is allowed to view them. Otherwise, such files will not be found.
Reimplemented from FileRepo.
Definition at line 35 of file NullRepo.php.
NullRepo::getFileProps | ( | $ | virtualUrl | ) |
Get properties of a file with a given virtual URL The virtual URL must refer to this repo Properties should ultimately be obtained via File::getPropsFromPath().
Reimplemented from FileRepo.
Definition at line 29 of file NullRepo.php.
NullRepo::newFile | ( | $ | title, | |
$ | time = false | |||
) |
Create a new File object from the local repository.
mixed | $title Title object or string | |
mixed | $time Time at which the image was uploaded. If this is specified, the returned object will be an instance of the repository's old file class instead of a current file. Repositories not supporting version control should return false if this parameter is set. |
Reimplemented from FileRepo.
Definition at line 32 of file NullRepo.php.
NullRepo::publishBatch | ( | $ | triplets, | |
$ | flags = 0 | |||
) |
Publish a batch of files.
array | $triplets (source,dest,archive) triplets as per publish() | |
integer | $flags Bitfield, may be FileRepo::DELETE_SOURCE to indicate that the source files should be deleted if possible |
Reimplemented from FileRepo.
Definition at line 20 of file NullRepo.php.
NullRepo::storeBatch | ( | $ | triplets, | |
$ | flags = 0 | |||
) |
Store a batch of files.
array | $triplets (src,zone,dest) triplets as per store() | |
integer | $flags Flags as per store |
Reimplemented from FileRepo.
Definition at line 10 of file NullRepo.php.
NullRepo::storeTemp | ( | $ | originalName, | |
$ | srcPath | |||
) |
Pick a random name in the temp zone and store a file to it.
Returns a FileRepoStatus object with the URL in the value.
string | $originalName The base name of the file as specified by the user. The file extension will be maintained. | |
string | $srcPath The current location of the file. |
Reimplemented from FileRepo.
Definition at line 14 of file NullRepo.php.