Introduce constants for fetchLanguageName(s)
authorNiklas Laxström <niklas.laxstrom@gmail.com>
Mon, 18 Jun 2018 18:30:10 +0000 (20:30 +0200)
committerNiklas Laxström <niklas.laxstrom@gmail.com>
Wed, 5 Sep 2018 19:29:27 +0000 (21:29 +0200)
commitd2838e7894f40dab6ef2a9d08a7656ac031dd22a
tree908fcd98a97ca16d0526bdf528b553988bebb676
parente200ad43e20e5a39e4edae6b16044b37e5f1fb0b
Introduce constants for fetchLanguageName(s)

Before:
 Language::fetchLanguageNames( null, 'mwfile' );
After:
 Language::fetchLanguageNames( self::AS_AUTONYMS, self::SUPPORTED );

The latter is much more readable and doesn't require knowing the
method definition by heart when seeing it in the code.

I did not add a constant for 'mw' because:
* It is the default value for a last parameter, so it can be left out
* In the long run I expect it will be folded into 'all', see T190129

I did not update any callers; that can be done in follow-ups after
the naming is agreed upon.

Change-Id: Ia9bbb525f213046487f08bcd196876befe87cae8
languages/Language.php