1 <?php
// For broken web servers: ><pre>
3 // If you are reading this in your web browser, your server is probably
4 // not configured correctly to run PHP applications!
6 // See the README, INSTALL, and UPGRADE files for basic setup instructions
7 // and pointers to the online documentation.
9 // https://www.mediawiki.org/wiki/Special:MyLanguage/MediaWiki
11 // -------------------------------------------------
14 * The.php entry point for web browser navigations, usually routed to
15 * an Action or SpecialPage subclass.
17 * @see MediaWiki\Actions\ActionEntryPoint The implementation.
19 * This program is free software; you can redistribute it and/or modify
20 * it under the terms of the GNU General Public License as published by
21 * the Free Software Foundation; either version 2 of the License, or
22 * (at your option) any later version.
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
29 * You should have received a copy of the GNU General Public License along
30 * with this program; if not, write to the Free Software Foundation, Inc.,
31 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
32 * http://www.gnu.org/copyleft/gpl.html
37 use MediaWiki\Actions\ActionEntryPoint
;
38 use MediaWiki\Context\RequestContext
;
39 use MediaWiki\EntryPointEnvironment
;
40 use MediaWiki\MediaWikiServices
;
42 define( 'MW_ENTRY_POINT', 'index' );
44 // Bail on old versions of PHP, or if composer has not been run yet to install
45 // dependencies. Using dirname( __FILE__ ) here because __DIR__ is PHP5.3+.
46 // phpcs:ignore MediaWiki.Usage.DirUsage.FunctionFound
47 require_once dirname( __FILE__
) . '/includes/PHPVersionCheck.php';
48 wfEntryPointCheck( 'html', dirname( $_SERVER['SCRIPT_NAME'] ) );
50 require __DIR__
. '/includes/WebStart.php';
52 // Create the entry point object and call run() to handle the request.
53 ( new ActionEntryPoint(
54 RequestContext
::getMain(),
55 new EntryPointEnvironment(),
56 // TODO: Maybe create a light-weight services container here instead.
57 MediaWikiServices
::getInstance()