Merge "Split SkinTemplate.php per-class"
[lhc/web/wiklou.git] / languages / Language.php
index 66bbadc..115a918 100644 (file)
@@ -784,6 +784,14 @@ class Language {
                return self::$dataCache->getSubitem( $this->mCode, 'imageFiles', $image );
        }
 
+       /**
+        * @return array
+        * @since 1.24
+        */
+       function getImageFiles() {
+               return self::$dataCache->getItem( $this->mCode, 'imageFiles' );
+       }
+
        /**
         * @return array
         */
@@ -1026,6 +1034,11 @@ class Language {
 
        /**
         * Pass through result from $dateTimeObj->format()
+        * @param DateTime|bool|null &$dateTimeObj
+        * @param string $ts
+        * @param DateTimeZone|bool|null $zone
+        * @param string $code
+        * @return string
         */
        private static function dateTimeObjFormat( &$dateTimeObj, $ts, $zone, $code ) {
                if ( !$dateTimeObj ) {
@@ -3137,7 +3150,7 @@ class Language {
                }
 
                if ( !is_array( $rawEntry ) ) {
-                       error_log( "\"$rawEntry\" is not a valid magic word for \"$mw->mId\"" );
+                       wfWarn( "\"$rawEntry\" is not a valid magic word for \"$mw->mId\"" );
                } else {
                        $mw->mCaseSensitive = $rawEntry[0];
                        $mw->mSynonyms = array_slice( $rawEntry, 1 );
@@ -3992,7 +4005,7 @@ class Language {
         * Get the list of variants supported by this language
         * see sample implementation in LanguageZh.php
         *
-        * @return array an array of language codes
+        * @return array An array of language codes
         */
        public function getVariants() {
                return $this->mConverter->getVariants();
@@ -4284,7 +4297,7 @@ class Language {
         *
         * @since 1.22
         * @param string $code Language code
-        * @return array array( fallbacks, site fallbacks )
+        * @return array Array( fallbacks, site fallbacks )
         */
        public static function getFallbacksIncludingSiteLanguage( $code ) {
                global $wgLanguageCode;
@@ -4339,7 +4352,7 @@ class Language {
         *
         * @since 1.19
         * @param string $code Language code
-        * @return array of message keys (strings)
+        * @return array Array of message keys (strings)
         */
        public static function getMessageKeysFor( $code ) {
                return self::getLocalisationCache()->getSubItemList( $code, 'messages' );