Manual:File.php

From Linux Web Expert

Revision as of 18:04, 26 September 2023 by imported>FuzzyBot (Updating to match new version of source page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

File.php contains a class, File, to represent files in a repository.

Usage notes:

  • A number of public functions, especially many of the 'stubs' (i.e. unimplemented public methods), are meant to be overridden.
  • The name of a file class is known only to the Repo object. To get File objects or generate new ones, use the Repo factory functions. It is usually sufficient to use something like:
    • MediaWikiServices::getInstance()->getRepoGroup()->findFile()
    • MediaWikiServices::getInstance()->getRepoGroup()->getLocalRepo()->newFile()

Véase también