languages: More doc annotations for LanguageConverter related classes
Deprecated LinkHolderArray for public usage Bug: T244709 Change-Id: Ic5b9e9237044b56cbb64e7c762f5d2de3b1de821
This commit is contained in:
parent
10b98b76f5
commit
f136c2953c
6 changed files with 52 additions and 4 deletions
|
|
@ -449,6 +449,8 @@ because of Phabricator reports.
|
||||||
use the RecentChange_save hook or similar instead.
|
use the RecentChange_save hook or similar instead.
|
||||||
* The ArticleEditUpdates hook has been deprecated. Please
|
* The ArticleEditUpdates hook has been deprecated. Please
|
||||||
use the RevisionDataUpdates hook or similar instead.
|
use the RevisionDataUpdates hook or similar instead.
|
||||||
|
* LinkHolderArray has been deprecated for public usage and will be
|
||||||
|
internal part of parser.
|
||||||
* …
|
* …
|
||||||
|
|
||||||
=== Other changes in 1.35 ===
|
=== Other changes in 1.35 ===
|
||||||
|
|
|
||||||
|
|
@ -647,7 +647,7 @@ $wgAutoloadLocalClasses = [
|
||||||
'IEContentAnalyzer' => __DIR__ . '/includes/libs/mime/IEContentAnalyzer.php',
|
'IEContentAnalyzer' => __DIR__ . '/includes/libs/mime/IEContentAnalyzer.php',
|
||||||
'IExpiringStore' => __DIR__ . '/includes/libs/objectcache/IExpiringStore.php',
|
'IExpiringStore' => __DIR__ . '/includes/libs/objectcache/IExpiringStore.php',
|
||||||
'IJobSpecification' => __DIR__ . '/includes/jobqueue/IJobSpecification.php',
|
'IJobSpecification' => __DIR__ . '/includes/jobqueue/IJobSpecification.php',
|
||||||
'ILanguageConverter' => __DIR__ . '/languages/ILanguageConverter.php',
|
'ILanguageConverter' => __DIR__ . '/includes/language/ILanguageConverter.php',
|
||||||
'ILocalizedException' => __DIR__ . '/includes/exception/ILocalizedException.php',
|
'ILocalizedException' => __DIR__ . '/includes/exception/ILocalizedException.php',
|
||||||
'IMaintainableDatabase' => __DIR__ . '/includes/libs/rdbms/database/IMaintainableDatabase.php',
|
'IMaintainableDatabase' => __DIR__ . '/includes/libs/rdbms/database/IMaintainableDatabase.php',
|
||||||
'IP' => __DIR__ . '/includes/compat/IP.php',
|
'IP' => __DIR__ . '/includes/compat/IP.php',
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,28 @@
|
||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
//namespace MediaWiki\Languages;
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
* http://www.gnu.org/copyleft/gpl.html
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @ingroup Language
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ILanguageConverter provide a shared interface for all language convertes.
|
* ILanguageConverter provide a shared interface for all language convertes.
|
||||||
*
|
*
|
||||||
|
* @ingroup Language
|
||||||
* @internal Shouldn't be implemented in extensions.
|
* @internal Shouldn't be implemented in extensions.
|
||||||
*/
|
*/
|
||||||
interface ILanguageConverter {
|
interface ILanguageConverter {
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
use MediaWiki\MediaWikiServices;
|
use MediaWiki\MediaWikiServices;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal for using in Parser only.
|
||||||
*
|
*
|
||||||
* @ingroup Parser
|
* @ingroup Parser
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,23 @@
|
||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
* http://www.gnu.org/copyleft/gpl.html
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @ingroup Language
|
||||||
|
*/
|
||||||
|
|
||||||
namespace MediaWiki\Languages;
|
namespace MediaWiki\Languages;
|
||||||
|
|
||||||
|
|
@ -17,6 +36,12 @@ use TrivialLanguageConverter;
|
||||||
use UzConverter;
|
use UzConverter;
|
||||||
use ZhConverter;
|
use ZhConverter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LanguageConverterFactory provide an interface for creating language conterters.
|
||||||
|
*
|
||||||
|
* @since 1.35
|
||||||
|
* @ingroup Language
|
||||||
|
*/
|
||||||
class LanguageConverterFactory {
|
class LanguageConverterFactory {
|
||||||
|
|
||||||
private $cache = [];
|
private $cache = [];
|
||||||
|
|
@ -47,6 +72,8 @@ class LanguageConverterFactory {
|
||||||
* @param bool $usePigLatinVariant should pig variant of English be used
|
* @param bool $usePigLatinVariant should pig variant of English be used
|
||||||
* @param callable $defaultLanguage - callback of () : Language, should return
|
* @param callable $defaultLanguage - callback of () : Language, should return
|
||||||
* default language. Used in getLanguageConverter when $language is null.
|
* default language. Used in getLanguageConverter when $language is null.
|
||||||
|
*
|
||||||
|
* @internal Should be called from MediaWikiServices only.
|
||||||
*/
|
*/
|
||||||
public function __construct( $usePigLatinVariant, callable $defaultLanguage ) {
|
public function __construct( $usePigLatinVariant, callable $defaultLanguage ) {
|
||||||
if ( $usePigLatinVariant ) {
|
if ( $usePigLatinVariant ) {
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
*
|
*
|
||||||
* See https://www.mediawiki.org/wiki/Writing_systems#LanguageConverter.
|
* See https://www.mediawiki.org/wiki/Writing_systems#LanguageConverter.
|
||||||
*
|
*
|
||||||
|
* @since 1.35
|
||||||
* @ingroup Language
|
* @ingroup Language
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue