Manual:Code/zh

本页面描述了MediaWiki源代码中的关键文件与目录. 有关更多详细信息，请参见由MediaWiki源代码使用doxygen自动生成的类、文件和综合参考资料.

访问节点

 * 参见Special:Version

您可以通过运行该段代码生成此列表： git grep -l /includes/WebStart.php.

这些是使用wiki时，浏览器可以遇到的文件. 所有这些文件都位于wiki根目录，每个文件都搭配 包装，对于网络服务器而言，它需要 扩展来通过PHP5引擎执行脚本.

==

用于文件缓存的默认目录，如果启用（通过设置 ——默认值为. ）. 该位置可使用$wgFileCacheDirectory来自定义.

包含各种文本文件，它们应当帮助您了解MediaWiki代码中最重要的部分.

Mediawiki扩展与核心代码分别放置. 安装扩展需要复制相关文件至该目录，并按照扩展自己的安装指导启用它（通常需编辑LocalSettings.php文件）. 在当前版本中，有一组扩展与全新MediaWiki安装文件一起分布.

该目录存储MediaWiki需要的常见包含文件.

此目录包含操作类，它们处理可在页面上执行的不同操作（例如查看、删除、编辑等）. 所有这些类都是 、 或 类的延伸. 其中有一些都是小操作，这些操作调用 或 类中的方法来进行实际工作.

此目录包含用于MediaWiki API的代码. 参见API:Main page/zh. 最常见的文件是：

此目录包含文件，这些文件写有与MediaWiki的缓存机制相关的代码.

This directory contains a few classes related to (request) contexts. As of MediaWiki 1.18 the context of a request is encapsulated inside a  instance which implements. A context is a way of grouping the parts of a request together. This reduces the need for globals. See for more information.

This directory contains the code for database support.  provides MediaWiki's database abstraction layer.

This directory contains the standard MediaWiki difference engine. A difference engine computes the difference between two texts. Whether this difference engine is used or some external diff tool, depends on the $wgExternalDiffEngine setting.

Files related to the job queue. Each job class for a specific type of job derives from the  class and has to implement a   method which does the actual job.

Some files related to logging the events which happen on a Wiki. This directory was introduced in MW 1.19. Some of the files were already present in olders versions, in the includes/ directory.

This directory contains files for handling several media formats, mostly images.

This directory contains some Unicode normalization routines. See for more information.

Files related to MediaWiki's caching mechanisms. The files in this directory provide the possibility to store objects in PHP accelerators, in memcached, in a database or in DBA files.

The MediaWiki parser, which transforms wikitext to HTML, can be found here together with related files. The most interesting files in this directory:

Files related to ResourceLoader, a JavaScript/CSS delivery optimizing system for MediaWiki.

This directory contains the code to implement the possibility of searching a wiki using one the possible backends.

This directory contains the code and classes for the standard special pages. All special page classes derive from class  (defined in |includes/SpecialPage.php]). Special pages which come with extension are located in their respective extensions directories. See also Manual:Special pages.

Files providing the backend of MediaWiki's file upload feature.

If uploads are enabled in the wiki, files will be put in subdirectories under this directory. See Manual:Image administration for more details.

该目录包含用于本地化与国际化的文件. 要获取快速预览，可参见MediaWiki中的语言.

该目录包含有必须通过命令行界面运行的维护脚本.

参见Manual:Maintenance scripts/zh以获取这些脚本的概况.

Entry point for the Config script (the helper script that helps setting up a newly installed wiki). The actual code of the installer is located at.

This directory contains JavaScript and CSS resources used by MediaWiki, including jQuery.

It also contains binary files like PNG and SVG images, for instance in : see Manual:Assets.

Location for serialized objects (database entries converted into files -- see Serialization for more information). The database tables that contain serialized data are listed at Manual:Serialization.

该目录包含了所有皮肤类、JavaScript、CSS以及一些用于皮肤的图片. 参见Manual:Skins/zh.

Contains various (unit)test related files, including:


 * Parser tests
 * PHPUnit tests
 * QUnit tests
 * browser tests for some core features