languages: More doc annotations for LanguageConverter related classes

Deprecated LinkHolderArray for public usage

Bug: T244709
Change-Id: Ic5b9e9237044b56cbb64e7c762f5d2de3b1de821
This commit is contained in:
Peter Ovchyn 2020-02-10 16:08:01 +02:00
parent 10b98b76f5
commit f136c2953c
6 changed files with 52 additions and 4 deletions

View file

@ -449,6 +449,8 @@ because of Phabricator reports.
use the RecentChange_save hook or similar instead.
* The ArticleEditUpdates hook has been deprecated. Please
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 ===

View file

@ -647,7 +647,7 @@ $wgAutoloadLocalClasses = [
'IEContentAnalyzer' => __DIR__ . '/includes/libs/mime/IEContentAnalyzer.php',
'IExpiringStore' => __DIR__ . '/includes/libs/objectcache/IExpiringStore.php',
'IJobSpecification' => __DIR__ . '/includes/jobqueue/IJobSpecification.php',
'ILanguageConverter' => __DIR__ . '/languages/ILanguageConverter.php',
'ILanguageConverter' => __DIR__ . '/includes/language/ILanguageConverter.php',
'ILocalizedException' => __DIR__ . '/includes/exception/ILocalizedException.php',
'IMaintainableDatabase' => __DIR__ . '/includes/libs/rdbms/database/IMaintainableDatabase.php',
'IP' => __DIR__ . '/includes/compat/IP.php',

View file

@ -1,10 +1,28 @@
<?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.
*
* @ingroup Language
* @internal Shouldn't be implemented in extensions.
*/
interface ILanguageConverter {

View file

@ -24,7 +24,7 @@
use MediaWiki\MediaWikiServices;
/**
* @internal
* @internal for using in Parser only.
*
* @ingroup Parser
*/

View file

@ -1,4 +1,23 @@
<?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;
@ -17,6 +36,12 @@ use TrivialLanguageConverter;
use UzConverter;
use ZhConverter;
/**
* LanguageConverterFactory provide an interface for creating language conterters.
*
* @since 1.35
* @ingroup Language
*/
class LanguageConverterFactory {
private $cache = [];
@ -47,6 +72,8 @@ class LanguageConverterFactory {
* @param bool $usePigLatinVariant should pig variant of English be used
* @param callable $defaultLanguage - callback of () : Language, should return
* default language. Used in getLanguageConverter when $language is null.
*
* @internal Should be called from MediaWikiServices only.
*/
public function __construct( $usePigLatinVariant, callable $defaultLanguage ) {
if ( $usePigLatinVariant ) {

View file

@ -31,6 +31,7 @@
*
* See https://www.mediawiki.org/wiki/Writing_systems#LanguageConverter.
*
* @since 1.35
* @ingroup Language
*/