wiki.techinc.nl/includes/filerepo
2010-08-07 19:10:28 +00:00
..
ArchivedFile.php Fixed some doxygen warnings 2010-02-15 22:06:18 +00:00
File.php Repair getDescriptionUrl() and getDescriptionText() Follow up to r69907 and r69908 2010-08-01 22:07:52 +00:00
FileRepo.php Fix for r68897: correct use of wfAppendQuery() 2010-08-07 19:10:28 +00:00
FileRepoStatus.php
ForeignAPIFile.php * Added scriptExtension setting to $wgForeignFileRepos 2010-07-02 18:37:06 +00:00
ForeignAPIRepo.php * Added scriptExtension setting to $wgForeignFileRepos 2010-07-02 18:37:06 +00:00
ForeignDBFile.php Repair getDescriptionUrl() and getDescriptionText() Follow up to r69907 and r69908 2010-08-01 22:07:52 +00:00
ForeignDBRepo.php Revert r64834, hasty and unnecessary 2010-04-09 22:09:07 +00:00
ForeignDBViaLBRepo.php
FSRepo.php Fixed some doxygen warnings 2010-03-26 21:55:13 +00:00
Image.php Fixed some doxygen warnings 2010-03-26 21:55:13 +00:00
LocalFile.php Repair getDescriptionUrl() and getDescriptionText() Follow up to r69907 and r69908 2010-08-01 22:07:52 +00:00
LocalRepo.php Fixed some doxygen warnings 2010-03-26 21:55:13 +00:00
NullRepo.php follow up r62231, r61779, r62175 2010-02-22 02:15:30 +00:00
OldLocalFile.php * (bug 24517) LocalFile::newFromKey() and OldLocalFile::newFromKey() no longer throw fatal errors 2010-07-25 11:40:52 +00:00
README
RepoGroup.php Fixed some doxygen warnings 2010-03-26 21:55:13 +00:00
UnregisteredLocalFile.php

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 behaviour 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 behaviour -- 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