Reedy 6aaaa070f3 Remove MimeMagic 6 rokov pred
..
file 6aaaa070f3 Remove MimeMagic 6 rokov pred
FileBackendDBRepoWrapper.php 2f23133bb6 filerepo: switch callers from ProcessCacheLRU to MapCacheLRU 6 rokov pred
FileRepo.php 90d4f56fe4 Mass conversion of $wgContLang to service 6 rokov pred
FileRepoStatus.php a49b3216fc Canonicalise '@deprecated since' doc comments 8 rokov pred
ForeignAPIRepo.php 485f66f174 Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient 6 rokov pred
ForeignDBRepo.php 8085c58a4b Replace call_user_func_array(), part 1 6 rokov pred
ForeignDBViaLBRepo.php e1a203603c Replace wfGetLB 6 rokov pred
LocalRepo.php 40d3ce8d17 Reduce calls to MediaWikiServices::getInstance() 6 rokov pred
NullRepo.php 0c5b6ecc8f Clean up get_class() in /includes/filerepo and /includes/resourceloader 8 rokov pred
README 9b7889b84b Use American English spelling for behavior 12 rokov pred
RepoGroup.php 88b69410f9 Avoid passing "false" as keys to MapCacheLRU in RepoGroup 6 rokov pred
TempFileRepo.php 9939781fe7 Move TempFileRepo to a separate file 8 rokov pred

README

Some quick notes on the file/repository architecture.

Functionality is, as always, driven by data model.

* The repository object stores configuration information about a file storage
method.

* The file object is a process-local cache of information about a particular
file.

Thus the file object is the primary public entry point for obtaining information
about files, since access via the file object can be cached, whereas access via
the repository should not be cached.

Functions which can act on any file specified in their parameters typically find
their place either in the repository object, where reference to
repository-specific configuration is needed, or in static members of File or
FileRepo, where no such configuration is needed.

File objects are generated by a factory function from the repository. The
repository thus has full control over the behavior of its subsidiary file
class, since it can subclass the file class and override functionality at its
whim. Thus there is no need for the File subclass to query its parent repository
for information about repository-class-dependent behavior -- the file subclass
is generally fully aware of the static preferences of its repository. Limited
exceptions can be made to this rule to permit sharing of functions, or perhaps
even entire classes, between repositories.

These rules alone still do lead to some ambiguity -- it may not be clear whether
to implement some functionality in a repository function with a filename
parameter, or in the file object itself.

So we introduce the following rule: the file subclass is smarter than the
repository subclass. The repository should in general provide a minimal API
needed to access the storage backend efficiently.

In particular, note that I have not implemented any database access in
LocalRepo.php. LocalRepo provides only file access, and LocalFile provides
database access and higher-level functions such as cache management.

Tim Starling, June 2007