Move DummyLinker to own file

Change-Id: I1808a6b77af2597b4dd2c9f1e0c8604c2bc8c801
This commit is contained in:
addshore 2016-04-20 08:48:48 +01:00
parent aa21cf32fa
commit b215e34de8
3 changed files with 21 additions and 18 deletions

View file

@ -357,7 +357,7 @@ $wgAutoloadLocalClasses = [
'DoubleRedirectJob' => __DIR__ . '/includes/jobqueue/jobs/DoubleRedirectJob.php',
'DoubleRedirectsPage' => __DIR__ . '/includes/specials/SpecialDoubleRedirects.php',
'DoubleReplacer' => __DIR__ . '/includes/libs/replacers/DoubleReplacer.php',
'DummyLinker' => __DIR__ . '/includes/Linker.php',
'DummyLinker' => __DIR__ . '/includes/DummyLinker.php',
'DummyTermColorer' => __DIR__ . '/maintenance/term/MWTerm.php',
'Dump7ZipOutput' => __DIR__ . '/includes/export/Dump7ZipOutput.php',
'DumpBZip2Output' => __DIR__ . '/includes/export/DumpBZip2Output.php',

20
includes/DummyLinker.php Normal file
View file

@ -0,0 +1,20 @@
<?php
/**
* @since 1.18
*/
class DummyLinker {
/**
* Use PHP's magic __call handler to transform instance calls to a dummy instance
* into static calls to the new Linker for backwards compatibility.
*
* @param string $fname Name of called method
* @param array $args Arguments to the method
* @return mixed
*/
public function __call( $fname, $args ) {
return call_user_func_array( [ 'Linker', $fname ], $args );
}
}

View file

@ -2360,20 +2360,3 @@ class Linker {
}
/**
* @since 1.18
*/
class DummyLinker {
/**
* Use PHP's magic __call handler to transform instance calls to a dummy instance
* into static calls to the new Linker for backwards compatibility.
*
* @param string $fname Name of called method
* @param array $args Arguments to the method
* @return mixed
*/
public function __call( $fname, $args ) {
return call_user_func_array( [ 'Linker', $fname ], $args );
}
}