MediaWiki REL1_32
Defines.php
Go to the documentation of this file.
1<?php
23require_once __DIR__ . '/libs/mime/defines.php';
24require_once __DIR__ . '/libs/rdbms/defines.php';
25
27
32# Obsolete aliases
36define( 'DB_SLAVE', -1 );
37
42define( 'LIST_COMMA', IDatabase::LIST_COMMA );
43define( 'LIST_AND', IDatabase::LIST_AND );
44define( 'LIST_SET', IDatabase::LIST_SET );
45define( 'LIST_NAMES', IDatabase::LIST_NAMES );
46define( 'LIST_OR', IDatabase::LIST_OR );
52define( 'NS_MEDIA', -2 );
53define( 'NS_SPECIAL', -1 );
64define( 'NS_MAIN', 0 );
65define( 'NS_TALK', 1 );
66define( 'NS_USER', 2 );
67define( 'NS_USER_TALK', 3 );
68define( 'NS_PROJECT', 4 );
69define( 'NS_PROJECT_TALK', 5 );
70define( 'NS_FILE', 6 );
71define( 'NS_FILE_TALK', 7 );
72define( 'NS_MEDIAWIKI', 8 );
73define( 'NS_MEDIAWIKI_TALK', 9 );
74define( 'NS_TEMPLATE', 10 );
75define( 'NS_TEMPLATE_TALK', 11 );
76define( 'NS_HELP', 12 );
77define( 'NS_HELP_TALK', 13 );
78define( 'NS_CATEGORY', 14 );
79define( 'NS_CATEGORY_TALK', 15 );
80
91define( 'NS_IMAGE', NS_FILE );
95define( 'NS_IMAGE_TALK', NS_FILE_TALK );
101define( 'CACHE_ANYTHING', -1 ); // Use anything, as long as it works
102define( 'CACHE_NONE', 0 ); // Do not cache
103define( 'CACHE_DB', 1 ); // Store cache objects in the DB
104define( 'CACHE_MEMCACHED', 2 ); // MemCached, must specify servers in $wgMemCacheServers
105define( 'CACHE_ACCEL', 3 ); // APC or WinCache
111define( 'AV_NO_VIRUS', 0 ); # scan ok, no virus found
112define( 'AV_VIRUS_FOUND', 1 ); # virus found!
113define( 'AV_SCAN_ABORTED', -1 ); # scan aborted, the file is probably immune
114define( 'AV_SCAN_FAILED', false ); # scan failed (scanner not found or error in scanner)
122define( 'ALF_PRELOAD_LINKS', 1 ); // unused
123define( 'ALF_PRELOAD_EXISTENCE', 2 ); // unused
124define( 'ALF_NO_LINK_LOCK', 4 ); // unused
125define( 'ALF_NO_BLOCK_LOCK', 8 ); // unused
132define( 'MW_DATE_DEFAULT', 'default' );
133define( 'MW_DATE_MDY', 'mdy' );
134define( 'MW_DATE_DMY', 'dmy' );
135define( 'MW_DATE_YMD', 'ymd' );
136define( 'MW_DATE_ISO', 'ISO 8601' );
142define( 'RC_EDIT', 0 );
143define( 'RC_NEW', 1 );
144define( 'RC_LOG', 3 );
145define( 'RC_EXTERNAL', 5 );
146define( 'RC_CATEGORIZE', 6 );
152define( 'EDIT_NEW', 1 );
153define( 'EDIT_UPDATE', 2 );
154define( 'EDIT_MINOR', 4 );
155define( 'EDIT_SUPPRESS_RC', 8 );
156define( 'EDIT_FORCE_BOT', 16 );
157define( 'EDIT_DEFER_UPDATES', 32 ); // Unused since 1.27
158define( 'EDIT_AUTOSUMMARY', 64 );
159define( 'EDIT_INTERNAL', 128 );
173
184define( 'OT_HTML', 1 );
185define( 'OT_WIKI', 2 );
186define( 'OT_PREPROCESS', 3 );
187define( 'OT_MSG', 3 ); // b/c alias for OT_PREPROCESS
188define( 'OT_PLAIN', 4 );
197define( 'SFH_NO_HASH', 1 );
198define( 'SFH_OBJECT_ARGS', 2 );
205define( 'APCOND_EDITCOUNT', 1 );
206define( 'APCOND_AGE', 2 );
208define( 'APCOND_INGROUPS', 4 );
209define( 'APCOND_ISIP', 5 );
210define( 'APCOND_IPINRANGE', 6 );
211define( 'APCOND_AGE_FROM_EDIT', 7 );
212define( 'APCOND_BLOCKED', 8 );
213define( 'APCOND_ISBOT', 9 );
219define( 'PROTO_HTTP', 'http://' );
220define( 'PROTO_HTTPS', 'https://' );
221define( 'PROTO_RELATIVE', '//' );
222define( 'PROTO_CURRENT', null );
223define( 'PROTO_CANONICAL', 1 );
224define( 'PROTO_INTERNAL', 2 );
235define( 'CONTENT_MODEL_WIKITEXT', 'wikitext' );
236define( 'CONTENT_MODEL_JAVASCRIPT', 'javascript' );
237define( 'CONTENT_MODEL_CSS', 'css' );
238define( 'CONTENT_MODEL_TEXT', 'text' );
249// wikitext
250define( 'CONTENT_FORMAT_WIKITEXT', 'text/x-wiki' );
251// for js pages
252define( 'CONTENT_FORMAT_JAVASCRIPT', 'text/javascript' );
253// for css pages
254define( 'CONTENT_FORMAT_CSS', 'text/css' );
255// for future use, e.g. with some plain-html messages.
256define( 'CONTENT_FORMAT_TEXT', 'text/plain' );
257// for future use, e.g. with some plain-html messages.
258define( 'CONTENT_FORMAT_HTML', 'text/html' );
259// for future use with the api and for extensions
260define( 'CONTENT_FORMAT_SERIALIZED', 'application/vnd.php.serialized' );
261// for future use with the api, and for use by extensions
262define( 'CONTENT_FORMAT_JSON', 'application/json' );
263// for future use with the api, and for use by extensions
264define( 'CONTENT_FORMAT_XML', 'application/xml' );
270define( 'SHELL_MAX_ARG_STRLEN', '100000' );
284define( 'SCHEMA_COMPAT_WRITE_OLD', 0x01 );
285define( 'SCHEMA_COMPAT_READ_OLD', 0x02 );
286define( 'SCHEMA_COMPAT_WRITE_NEW', 0x10 );
287define( 'SCHEMA_COMPAT_READ_NEW', 0x20 );
315define( 'MIGRATION_OLD', 0x00000000 | SCHEMA_COMPAT_OLD );
318define( 'MIGRATION_NEW', 0x30000000 | SCHEMA_COMPAT_NEW );
Apache License January http
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use
const MW_SUPPORTS_RESOURCE_MODULES
Support for $wgResourceModules.
Definition Defines.php:172
The package json
Definition README.txt:1
const SCHEMA_COMPAT_WRITE_BOTH
Definition Defines.php:288
const APCOND_BLOCKED
Definition Defines.php:212
const CONTENT_FORMAT_JAVASCRIPT
Definition Defines.php:252
const SCHEMA_COMPAT_OLD
Definition Defines.php:290
const OT_WIKI
Definition Defines.php:185
const SFH_NO_HASH
Definition Defines.php:197
const ALF_PRELOAD_LINKS
Definition Defines.php:122
const CONTENT_FORMAT_HTML
Definition Defines.php:258
const CONTENT_FORMAT_JSON
Definition Defines.php:262
const SCHEMA_COMPAT_READ_NEW
Definition Defines.php:287
const PROTO_CANONICAL
Definition Defines.php:223
const EDIT_FORCE_BOT
Definition Defines.php:156
const APCOND_AGE
Definition Defines.php:206
const ALF_NO_BLOCK_LOCK
Definition Defines.php:125
const ALF_PRELOAD_EXISTENCE
Definition Defines.php:123
const APCOND_EMAILCONFIRMED
Definition Defines.php:207
const SCHEMA_COMPAT_READ_BOTH
Definition Defines.php:289
const SFH_OBJECT_ARGS
Definition Defines.php:198
const EDIT_DEFER_UPDATES
Definition Defines.php:157
const EDIT_INTERNAL
Definition Defines.php:159
const EDIT_UPDATE
Definition Defines.php:153
const PROTO_HTTPS
Definition Defines.php:220
const SCHEMA_COMPAT_WRITE_OLD
Definition Defines.php:284
const APCOND_IPINRANGE
Definition Defines.php:210
const MW_SUPPORTS_CONTENTHANDLER
Definition Defines.php:167
const CONTENT_MODEL_CSS
Definition Defines.php:237
const APCOND_INGROUPS
Definition Defines.php:208
const NS_FILE
Definition Defines.php:70
const RC_NEW
Definition Defines.php:143
const PROTO_CURRENT
Definition Defines.php:222
const MW_EDITFILTERMERGED_SUPPORTS_API
Definition Defines.php:168
const PROTO_INTERNAL
Definition Defines.php:224
const CONTENT_FORMAT_TEXT
Definition Defines.php:256
const APCOND_ISBOT
Definition Defines.php:213
const APCOND_AGE_FROM_EDIT
Definition Defines.php:211
const NS_FILE_TALK
Definition Defines.php:71
const EDIT_SUPPRESS_RC
Definition Defines.php:155
const MW_DATE_MDY
Definition Defines.php:133
const CONTENT_FORMAT_CSS
Definition Defines.php:254
const OT_PLAIN
Definition Defines.php:188
const MW_DATE_DMY
Definition Defines.php:134
const MW_SUPPORTS_LOCALISATIONCACHE
Definition Defines.php:166
const OT_PREPROCESS
Definition Defines.php:186
const APCOND_ISIP
Definition Defines.php:209
const CONTENT_MODEL_WIKITEXT
Definition Defines.php:235
const MIGRATION_WRITE_NEW
Definition Defines.php:317
const SCHEMA_COMPAT_READ_OLD
Definition Defines.php:285
const CONTENT_MODEL_JSON
Definition Defines.php:239
const MIGRATION_NEW
Definition Defines.php:318
const RC_LOG
Definition Defines.php:144
const RC_EXTERNAL
Definition Defines.php:145
const MW_DATE_YMD
Definition Defines.php:135
const CONTENT_FORMAT_WIKITEXT
Definition Defines.php:250
const PROTO_HTTP
Definition Defines.php:219
const OT_HTML
Definition Defines.php:184
const CONTENT_MODEL_TEXT
Definition Defines.php:238
const SCHEMA_COMPAT_WRITE_NEW
Definition Defines.php:286
const SHELL_MAX_ARG_STRLEN
Definition Defines.php:270
const APCOND_EDITCOUNT
Definition Defines.php:205
const MW_DATE_ISO
Definition Defines.php:136
const PROTO_RELATIVE
Definition Defines.php:221
const MW_DATE_DEFAULT
Definition Defines.php:132
const SCHEMA_COMPAT_NEW
Definition Defines.php:291
const CONTENT_FORMAT_SERIALIZED
Definition Defines.php:260
const MIGRATION_WRITE_BOTH
Definition Defines.php:316
const RC_EDIT
Definition Defines.php:142
const MIGRATION_OLD
Definition Defines.php:315
const MW_SUPPORTS_PARSERFIRSTCALLINIT
Definition Defines.php:165
const EDIT_MINOR
Definition Defines.php:154
const CONTENT_FORMAT_XML
Definition Defines.php:264
const CONTENT_MODEL_JAVASCRIPT
Definition Defines.php:236
const EDIT_AUTOSUMMARY
Definition Defines.php:158
const ALF_NO_LINK_LOCK
Definition Defines.php:124
const OT_MSG
Definition Defines.php:187
const EDIT_NEW
Definition Defines.php:152
const RC_CATEGORIZE
Definition Defines.php:146
either a plain
Definition hooks.txt:2105
Using a hook running we can avoid having all this option specific stuff in our mainline code Using the function We ve cleaned up the code here by removing clumps of infrequently used code and moving them off somewhere else It s much easier for someone working with this code to see what s _really_ going and make changes or fix bugs In we can take all the code that deals with the little used title reversing we can concentrate it all in an extension file
Definition hooks.txt:106
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition injection.txt:37
Basic database interface for live and lazy-loaded relation database handles.
Definition IDatabase.php:38
This document provides an overview of the usage of PageUpdater and that is