Manual:Code/ru
На этой странице перечислены основные файлы (классы) и папки, составляющие программный код MediaWiki. Для получения более подробной информации см. документацию этих классов, файлов и общую, автоматически генерируемую из исходного кода MediaWiki посредством doxygen.
This page is in progress of translating to Russian. You can help translating it or go to another language version that follows:
Эта страница в процессе перевода на русский язык. Вы можете помочь в переводе или перейти на другие языковые версии, указанные ниже:
| Язык: | English • Deutsch • français • Bahasa Indonesia • 日本語 • português do Brasil • русский • 中文(简体) |
|---|
Точки доступа [edit]
| Файл | Описание | |
|---|---|---|
index.php |
Основная точка доступа к ПО MediaWiki. Обрабатывает большинство запросов к MediaWiki. См. Manual:index.php. | Manual:index.php |
api.php |
Точка доступа для внешних обращений через API MediaWiki. См. API:Main page и Manual:api.php. | Manual:api.php |
load.php |
Скрипт для интерфейсного подключения для загрузки модулей через ResourceLoader. См. также Manual:load.php. | Manual:load.php |
img_auth.php |
Сценарий, обеспечивающий доступ к изображениям только авторизованных пользователей. Как настроить вики для использования этого сценария, см. в руководстве Manual:Image Authorisation. См. также Manual:img_auth.php. | Manual:img_auth.php |
opensearch_desc.php |
Возвращает документ с описанием в формате OpenSearch, описывающий веб-интерфейс поискового модуля MediaWiki. См. также Manual:opensearch_desc.php. | Manual:opensearch_desc.php |
profileinfo.php |
Позволяет пользователям видеть хранящуюся в базе данных информацию профилирования. См. How to debug#Profiling. См. также Manual:profileinfo.php. | Manual:profileinfo.php |
redirect.php |
Сценарий, всего-навсего перенаправляющий на статью, пришедшую в параметре запроса wpDropdown. Требуется для стиля Nostalgia. См. Manual:redirect.php. | Manual:redirect.php |
thumb.php |
Сценарий, используемый для изменения размеров изображений. См. Manual:thumb.php. | Manual:thumb.php |
thumb_handler.php |
Access to thumbnails using HTTP-errors (Status Code 404) | Manual:thumb_handler.php |
trackback.php |
Позволяет добавлять в базу данных trackbacks-уведомления. Удалено начиная с MediaWiki 1.19 (r104051). См. Manual:trackback.php. | Manual:trackback.php |
Папка /includes/ [edit]
Эта папка содержит все файлы, требуемые MediaWiki.
| Файл | Описание | |
|---|---|---|
includes/Article.php |
Содержит класс Article, обеспечивающий методы просмотра, изменения и управления статьями. Это поддерживает функции вики-страниц для обратной совместимости. См. Manual:Article.php. |
Manual:Article.php |
includes/Defines.php |
Defines several constants, suchs as those for namespaces, which are used by other files and classes. | Manual:Defines.php |
includes/EditPage.php |
Provides much of the code related to the editing user interface | Manual:EditPage.php |
includes/GlobalFunctions.php |
Contains globally used functions like wfMsgExt. See Manual:GlobalFunctions.php. | Manual:GlobalFunctions.php |
includes/Linker.php |
Содержит методы для создания внутренних и внешних ссылок, а также ссылок на изображения; осуществляет обнаружение существующих страниц. См. Manual:Linker.php. | Manual:Linker.php |
includes/OutputPage.php |
Содержит результат парсинга HTML и викитекста. Может также гененрировать элемент <head> или его часть. Manual:OutputPage.php. |
Manual:OutputPage.php |
includes/Pager.php |
Содержит класс IndexPager, используемый для подкачки результатов запросов MySQL. См. Manual:Pager.php. |
Manual:Pager.php |
includes/Parser.php |
Этот файл описывает объект парсера, используемый для конвертации викитекста в HTML (хотя и несколько фрагментов есть и в Manual:Skin.php.). См. Manual:Parser.php. | Manual:Parser.php |
includes/Setup.php |
Включает некоторые часто используемые файлы и создаёт объекты, определяемые глобальными переменными и обеспечивающие работоспособность MediaWiki. См. Manual:Setup.php. | Manual:Setup.php |
includes/Skin.php |
Инкапсулирует «внешний вид» вики-проекта. См. Manual:Skin.php. | Manual:Skin.php |
includes/SpecialPage.php |
Содержит класс SpecialPage, являющийся родительским для всех классов служебных страниц. It also makes available several static functions for handling the special page list and several other special page classes, like RedirectSpecialPage and IncludableSpecialPage. See Manual:SpecialPage.php and Manual:Special pages. |
Manual:SpecialPage.php |
includes/SiteStats.php |
Содержит класс SiteStats, предназначенный для статистики сайта и всех относящихся к этой области задач |
Manual:SiteStats.php |
includes/Title.php |
Представляет название статьи, и делает всю работу по его преобразованию в различные формы, такие, как простой текст, URL, ключ базы данных и т.д. Для удобства использования, а также по причинам исторического характера, здесь также обрабатываются некоторые особенности статей, не связанные с их текстом, как, например, права доступа. См. Manual:Title.php. | Manual:Title.php |
includes/User.php |
Инкапсулирует состояние возможности просмотра/использования сайта пользователем. Может быть запрошен относительно таких вещей, как настройки пользователя, его имя и т.д. Обрабатывает детали, чтения из таблицы «user» базы данных и сохранения в неё; имеет дело с сессиями и куками. См. Manual:User.php. | Manual:User.php |
includes/UserMailer.php |
Collection of static functions for sending mail. See Manual:UserMailer.php. | Manual:UserMailer.php |
includes/WebRequest.php |
Этот файл содержит описание класса WebRequest. См. Manual:WebRequest.php. | Manual:WebRequest.php |
includes/WebStart.php |
Выполняет ключевые настройки для веб-запроса: проверки безопасности, загрузка LocalSettings.php и Setup.php. См. Manual:WebStart.php. | Manual:WebStart.php |
includes/Wiki.php |
Этот файл содержит описание класса MediaWiki. См. Manual:Wiki.php. | Manual:Wiki.php |
includes/WikiPage.php |
Contains the WikiPage class, which represents an article in the wiki. | Manual:WikiPage.php |
Папка /includes/actions/ [edit]
This directory contains the Action classes, which handle the different actions which can be performed on pages (e.g. view, delete, edit, etc.). All these classes extend the Action, FormlessAction or FormAction classes. Some of them are just stubs which call methods in the Article or EditPage classes to do the actual work.
| Файл | Описание | |
|---|---|---|
includes/actions/CreditsAction.php |
Handles formatting the credits for articles. See also Manual:$wgMaxCredits. | Manual:CreditsAction.php |
includes/actions/DeleteAction.php |
Handles page deletion. | Manual:DeleteAction.php |
includes/actions/EditAction.php |
Contains classes EditAction and SubmitAction which handle the edit and submitting actions. |
Manual:EditAction.php |
includes/actions/HistoryAction.php |
Handles printing the history page for an article. | Manual:HistoryAction.php |
includes/actions/InfoAction.php |
Displays informations about a page, like the total number of edits and number of unique editors. | Manual:InfoAction.php |
includes/actions/MarkpatrolledAction.php |
Handles marking a revision as patrolled. | Manual:MarkpatrolledAction.php |
includes/actions/ProtectAction.php |
Handles protecting a page. | Manual:ProtectAction.php |
includes/actions/PurgeAction.php |
Handles purging a page. | Manual:PurgeAction.php |
includes/actions/RawAction.php |
Handles the "action=raw" action. | Manual:RawAction.php |
includes/actions/RenderAction.php |
Handles the render action, which shows an HTML rendering of the page; similar to the view action, but only the unstyled article text is shown, not the additional toolboxes, search boxes, stylesheets, etc. | Manual:RenderAction.php |
includes/actions/RevertAction.php |
Contains class RevertFileAction, which handles reverting a file. |
Manual:RevertAction.php |
includes/actions/RevisiondeleteAction.php |
Handles the revision delete action by just passing the request to Special:RevisionDelete. | Manual:RevisiondeleteAction.php |
includes/actions/RollbackAction.php |
Handles rolling back a page. | Manual:RollbackAction.php |
includes/actions/ViewAction.php |
Handles the viewing of a page, by calling Article::view(). |
Manual:ViewAction.php |
includes/actions/WatchAction.php |
Contains classes WatchAction and UnwatchAction, which handle watching and unwatching a page. |
Manual:WatchAction.php |
Папка /includes/api/ [edit]
This directory contains the code for the MediaWiki API. See API:Main page. The most important files are:
| Файл | Описание | |
|---|---|---|
includes/api/ApiBase.php |
The base class for all API classes. Has a lot of common code for all API actions. Inherits class ContextSource |
Manual:ApiBase.php |
includes/api/ApiFormatBase.php |
The base class for all formatting classes. Inherits ApiBase. | Manual:ApiFormatBase.php |
includes/api/ApiQueryBase.php |
The base class for all query API classes. Inherits ApiBase. | Manual:ApiQueryBase.php |
Папка /includes/cache/ [edit]
This directory contains files with code relating to MediaWiki's caching mechanisms.
| Файл | Описание | |
|---|---|---|
cache/FileCacheBase.php |
The FileCacheBase class is the base class for classes which provide a file based cache scheme. See Manual:File cache. |
Manual:FileCacheBase.php |
cache/GenderCache.php |
Caches user genders when needed to use correct namespace aliases. | Manual:GenderCache.php |
cache/HTMLCacheUpdate.php |
Invalidates the HTML cache of all the pages linking to a given title. | Manual:HTMLCacheUpdate.php |
HTMLFileCache.php |
File based caching of HTML pages. | Manual:HTMLFileCache.php |
cache/LinkBatch.php |
The LinkBatch class represents a list of titles. |
Manual:LinkBatch.php |
cache/LinkCache.php |
Description | Manual:LinkCache.php |
cache/MemcachedSessions.php |
This file gets included if $wgSessionsInMemcache is set in the config. It redirects session handling functions to store their data in memcached instead of the local filesystem. | Manual:MemcachedSessions.php |
cache/MessageCache.php |
Performs various MediaWiki namespace-related functions. | Manual:MessageCache.php |
cache/ObjectFileCache.php |
File based caching of objects. | Manual:ObjectFileCache.php |
cache/ResourceFileCache.php |
File based caching of JavaScript and CSS resources. | Manual:ResourceFileCache.php |
cache/SquidUpdate.php |
Handles purging appropriate Squid URLs given a title (or titles). | Manual:SquidUpdate.php |
Папка /includes/context/ [edit]
This directory contains a few classes related to (request)contexts. As of MediaWiki 1.18 the context of a request is encapsulated inside a RequestContext instance which implements IContextSource. A context is a way of grouping the parts of a request together. This reduces the need for globals. See Manual:RequestContext for more information.
| Файл | Описание | |
|---|---|---|
includes/context/ContextSource.php |
The ContextSource class implements the IContextSource interface. It is a helper class: by making a class extend ContextSource the class will be provided with the various getOutput, getSkin, getLanguage, etc. helpers directly and will implement IContextSource. |
Manual:ContextSource.php |
includes/context/DerivativeContext.php |
A DerivativeContext is an IContextSource implementation which will inherit context from another source but allows individual pieces of context to be changed locally. |
Manual:DerivativeContext.php |
includes/context/IContextSource.php |
This file contains the IContextSource interface. This interface should be implemented by objects which provide a context on a request. |
Manual:IContextSource.php |
includes/context/RequestContext.php |
A RequestContext object groups all the pieces relevant to the context of a request into one instance. |
Manual:RequestContext.php |
Папка /includes/db/ [edit]
This directory contains the code for database support. Database.php provides MediaWiki's database abstraction layer.
Папка /includes/diff/ [edit]
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.
| Файл | Описание | |
|---|---|---|
includes/diff/DairikiDiff.php |
The DairikiDiff engine. Currently the standard diff engine. The file defines several related classes. | Manual:DairikiDiff.php |
includes/diff/DifferenceEngine.php |
The DifferenceEngine class the interface between MediaWiki and whichever difference engine is used. Which difference engine is used depends on the $wgExternalDiffEngine config setting. |
Manual:DifferenceEngine.php |
includes/diff/WikiDiff3.php |
Another diff engine. Currently not in use. | Manual:WikiDiff3.php |
Папка /includes/job/ [edit]
Files related to the job queue. Each job class for a specific type of job derives from the Job class and has to implement a run() method which does the actual job.
| Файл | Описание | |
|---|---|---|
includes/job/DoubleRedirectJob.php |
Job to fix double redirects after moving a page | Manual:DoubleRedirectJob.php |
includes/job/EnotifNotifyJob.php |
Job for email notification. | Manual:EnotifNotifyJob.php |
includes/job/JobQueue.php |
Contains the Job class. This is the abstract class to describe a background job. The class also contains static functions for handling jobs (insert jobs in the queue and pop jobs from the queue). |
Manual:JobQueue.php |
includes/job/RefreshLinksJob.php |
Contains the RefreshLinksJob and RefreshLinksJob2 classes for jobs to update links for a given title. They use class LinksUpdate (defined in /includes/LinksUpdate.php) to update several db tables. |
Manual:RefreshLinksJob.php |
includes/job/UploadFromUrlJob.php |
Job for asynchronous upload-by-url. Its an interface to the UploadFromUrl class in /includes/upload/UploadFromUrl.php. |
Manual:UploadFromUrlJob.php |
Папка /includes/logging/ [edit]
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.
| Файл | Описание | |
|---|---|---|
includes/logging/LogEntry.php |
Contains the LogEntry interface and some classes implementing this interface to encapsulate log entries. Introduced in MW 1.19. |
Manual:LogEntry.php |
includes/logging/LogEventsList.php |
A class to list log entries. | Manual:LogEventsList.php |
includes/logging/LogFormatter.php |
Contains several classes for formatting log entries. Introduced in MW 1.19. | Manual:LogFormatter.php |
includes/logging/LogPage.php |
Class to manage a log: add entries to the log and extract information from the log. | Manual:LogPage.php |
includes/logging/LogPager.php |
Class to list log entries. Implements the ReverseChronologicalPager class. |
Manual:LogPager.php |
includes/logging/PatrolLog.php |
Class containing static functions for working with logs of patrol events. | Manual:PatrolLog.php |
Папка /includes/media/ [edit]
This directory contains files for handling several media formats, mostly images.
Папка /includes/normal/ [edit]
This directory contains some Unicode normalization routines. See includes/normal/README for more information.
Папка /includes/objectcache/ [edit]
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.
| Файл | Описание | |
|---|---|---|
includes/objectcache/APCBagOStuff.php |
Implementation of BagOStuff for APC's shared memory functions. | Manual:APCBagOStuff.php |
includes/objectcache/BagOStuff.php |
Abstract class to be derived by classes which cache objects in PHP accelerators, SQL database or DBA files. It specifies the methods a cache class must provide, like get(), set(), delete(), etc. | Manual:BagOStuff.php |
includes/objectcache/DBABagOStuff.php |
Implementation of BagOStuff which uses PHP's DBA extension as a backend. | Manual:DBABagOStuff.php |
includes/objectcache/EhcacheBagOStuff.php |
Implementation of BagOStuff using the Ehcache RESTful web service. | Manual:EhcacheBagOStuff.php |
includes/objectcache/EmptyBagOStuff.php |
Emulates an empty BagOStuff. | Manual:EmptyBagOStuff.php |
includes/objectcache/MemcachedClient.php |
Contains the MWMemcached class, a PHP memcache client. |
Manual:MemcachedClient.php |
includes/objectcache/MemcachedPhpBagOStuff.php |
Implementation of BagOStuff using memcached. It uses the MWMemcached class as a pure PHP memcached client. |
Manual:MemcachedPhpBagOStuff.php |
includes/objectcache/MultiWriteBagOStuff.php |
Implementation of BagOStuff that replicates all writes to multiple child caches. | Manual:MultiWriteBagOStuff.php |
includes/objectcache/ObjectCache.php |
The ObjectCache class contains some static helper functions for caching objects. | Manual:ObjectCache.php |
includes/objectcache/SqlBagOStuff.php |
Implementation of BagOStuff using a database. | Manual:SqlBagOStuff.php |
includes/objectcache/inCacheBagOStuff.php |
Implementation of BagOStuff using WinCache. | Manual:inCacheBagOStuff.php |
includes/objectcache/CacheBagOStuff.php |
Implementation of BagOStuff using XCache. | Manual:CacheBagOStuff.php |
Папка /includes/parser/ [edit]
The MediaWiki parser, which transforms wikitext to HTML, can be found here together with related files. The most interesting files in this directory:
| Файл | Описание | |
|---|---|---|
includes/parser/CoreParserFunctions.php |
A collection of functions which implement the core parser functions. | Manual:CoreParserFunctions.php |
includes/parser/CoreTagHooks.php |
Tag hooks provided by MediaWiki core, e.g. <nowiki>, <gallery>, <pre>, .. | Manual:CoreTagHooks.php |
includes/parser/LinkHolderArray.php |
A LinkHolderArray holds a set of replacement pairs for wiki links. | Manual:LinkHolderArray.php |
includes/parser/Parser.php |
This file contains the parser. A few regular expressions are included. See Manual:Parser.php. | Manual:Parser.php |
includes/parser/ParserCache.php |
This class handles caching the output from the parser. | Manual:ParserCache.php |
includes/parser/ParserOptions.php |
The ParserOptions class holds a collection of options for the parser. |
Manual:ParserOptions.php |
includes/parser/ParserOutput.php |
Contains the ParserOutput class, which encapsulates the output of the parser. |
Manual:ParserOutput.php |
includes/parser/Preprocessor.php |
Contains the Preprocessor interface for preprocessors. Also contains the PPFrame and PPNode interfaces. |
Manual:Preprocessor.php |
includes/parser/Preprocessor_DOM.php |
A preprocessor using PHP's DOM extension. See Manual:Preprocessor_DOM.php. This preprocessor is used if the PHP DOM extension is available. | Manual:Preprocessor_DOM.php |
includes/parser/Preprocessor_Hash.php |
A preprocessor using PHP arrays. This preprocessor is used if the PHP DOM isn't available or when the old XMLDOM extension is present. | Manual:Preprocessor_Hash.php |
includes/parser/Preprocessor_HipHop.php |
A preprocessor optimised for HipHop, using HipHop-specific syntax. | Manual:Preprocessor_HipHop.php |
Папка /includes/resourceloader/ [edit]
Files related to ResourceLoader, a JavaScript/CSS delivery optimizing system for MediaWiki.
Папка /includes/search/ [edit]
This directory contains the code to implement the possibility of searching a wiki using one the possible backends.
| Файл | Описание | |
|---|---|---|
includes/search/SearchEngine.php |
Contains several classes related to searching a wiki. The SearchEngine class is the parent class for specific search implementations. |
Manual:SearchEngine.php |
includes/search/SearchIBM_DB2.php |
Implements SearchEngine using IBM DB2. | Manual:SearchIBM_DB2.php |
includes/search/SearchMssql.php |
Implements SearchEngine using Msssql. | Manual:SearchMssql.php |
includes/search/SearchMySQL.php |
Implements SearchEngine using a MySQL search engine. | Manual:SearchMySQL.php |
includes/search/SearchOracle.php |
Implements SearchEngine using Oracle (ConText). | Manual:SearchOracle.php |
includes/search/SearchSqlite.php |
Implements SearchEngine using SQLite. | Manual:SearchSqlite.php |
Папка /includes/specials/ [edit]
This directory contains the code and classes for the standard special pages. All special page classes derive from class SpecialPage (defined in includes/SpecialPage.php). Special pages which come with extension are located in their respective extensions directories. See also Manual:Special pages.
Папка /includes/upload/ [edit]
Files providing the backend of MediaWiki's file uploads.
| Файл | Описание | |
|---|---|---|
includes/upload/UploadBase.php |
UploadBase and subclasses are the backend of MediaWiki's file uploads. | Manual:UploadBase.php |
includes/upload/UploadFromChunks.php |
Subclass of UploadBase implementing uploading from chunks. | Manual:UploadFromChunks.php |
includes/upload/UploadFromFile.php |
Subclass of UploadBase implementing regular file uploads. | Manual:UploadFromFile.php |
includes/upload/UploadFromStash.php |
Subclass of UploadBase implementing uploading from previously stored file. | Manual:UploadFromStash.php |
includes/upload/UploadFromUrl.php |
Subclass of UploadBase implementing uploading from a HTTP resource. | Manual:UploadFromUrl.php |
includes/upload/UploadStash.php |
Provides the possibility to enable applications to temporarily stash files without publishing them to the wiki. | Manual:UploadStash.php |
Папка /languages/ [edit]
Эта папка содержит файлы, используемые для локализации и организации многоязычных проектов. Получить быстрый обзор можно на стр. Language in MediaWiki.
| Файл | Описание | |
|---|---|---|
languages/Language.php |
Содержит класс Language, определяющий язык для отображения служебных текстов, а также включающий ряд функций для поддержки различных кодировок символов и другие элементы локализации. Две глобальные переменные содержат экземпляр этого класса: $wgContLang, определяющая язык сайта, и $wgLang, определяющая язык интерфейса пользователя. |
Manual:Language.php |
Папка /maintenance/ [edit]
Эта папка содержит сервисные сценарии (скрипты), которые должны запускаться из интерфейса командной строки.
См. обзор этих сценариев в Manual:Maintenance scripts.
Папка /resources/ [edit]
Эта папка содержит используемые MediaWiki ресурсы JavaScript и таблицы стилей CSS, включая jQuery.
Папка /skins/ [edit]
Эта папка содержит все классы стилей оформления, сценарии на языке JavaScript, таблицы стилей CSS и некоторые файлы изображений, используемых в оформлении. См. Manual:Skins.
Папка /tests/ [edit]
Содержит различные относящиеся к файлам (юнит-)тесты, включая:
| Язык: | English • Deutsch • français • Bahasa Indonesia • 日本語 • português do Brasil • русский • 中文(简体) |
|---|