Go to the documentation of this file.
4 protected function setUp() {
10 $this->testLocalClasses =
array(
11 'TestAutoloadedLocalClass' => __DIR__ .
'/../data/autoloader/TestAutoloadedLocalClass.php',
12 'TestAutoloadedCamlClass' => __DIR__ .
'/../data/autoloader/TestAutoloadedCamlClass.php',
13 'TestAutoloadedSerializedClass' => __DIR__ .
'/../data/autoloader/TestAutoloadedSerializedClass.php',
18 $this->testExtensionClasses =
array(
19 'TestAutoloadedClass' => __DIR__ .
'/../data/autoloader/TestAutoloadedClass.php',
46 $files = array_unique( $expected );
51 if ( substr(
$file, 0, 1 ) !=
'/' && substr(
$file, 1, 1 ) !=
':' ) {
52 $filePath =
"$IP/$file";
57 $contents = file_get_contents( $filePath );
63 (?:final\s+)? (?:abstract\s+)? (?:class|interface) \s+
64 (?P<class> [a-zA-Z0-9_]+)
66 class_alias \s* \( \s*
67 ([\'"]) (?P<original> [^\'"]+) \g{-2} \s* , \s*
68 ([\'"]) (?P<alias> [^\'"]+ ) \g{-2} \s*
71 /imx', $contents,
$matches, PREG_SET_ORDER );
73 $classesInFile =
array();
74 $aliasesInFile =
array();
77 if ( !empty( $match[
'class'] ) ) {
78 $actual[$match[
'class']] =
$file;
79 $classesInFile[$match[
'class']] =
true;
81 $aliasesInFile[$match[
'alias']] = $match[
'original'];
88 foreach ( $aliasesInFile
as $alias => $class ) {
89 if ( isset( $classesInFile[$class] ) ) {
90 $actual[$alias] =
$file;
92 $actual[$alias] =
"[original class not in $file]";
98 'expected' => $expected,
104 $this->assertTrue( class_exists(
'TestAutoloadedLocalClass' ) );
108 $this->assertTrue( class_exists(
'TestAutoloadedClass' ) );
112 $this->assertTrue( class_exists(
'testautoLoadedcamlCLASS' ) );
116 $dummyCereal =
'O:29:"testautoloadedserializedclass":0:{}';
117 $uncerealized = unserialize( $dummyCereal );
118 $this->assertFalse( $uncerealized instanceof __PHP_Incomplete_Class,
119 "unserialize() can load classes case-insensitively." );
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
global $wgAutoloadClasses
testWrongCaseSerializedClass()
testAutoLoadConfig()
Assert that there were no classes loaded that are not registered with the AutoLoader.
static resetAutoloadLocalClassesLower()
Method to clear the protected class property $autoloadLocalClassesLower.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
if(!defined( 'MEDIAWIKI')) if(!isset( $wgVersion)) $matches
if(PHP_SAPI !='cli') $file
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
static checkAutoLoadConf()
global $wgAutoloadLocalClasses
Locations of core classes Extension classes are specified with $wgAutoloadClasses This array is a glo...