Increase backwards compatibility with version 3: make ALL global vars available which...
[plcapi.git] / src / Helper / Charset.php
index d7670a1..5225c59 100644 (file)
@@ -237,4 +237,25 @@ class Charset
             return false;
         }
     }
+
+    /**
+     * Used only for backwards compatibility
+     * @deprecated
+     *
+     * @param string $charset
+     *
+     * @return array
+     *
+     * @throws \Exception for unknown/unsupported charsets
+     */
+    public function getEntities($charset)
+    {
+        switch ($charset)
+        {
+            case 'iso88591':
+                return $this->xml_iso88591_Entities;
+            default:
+                throw new \Exception('Unsupported charset: ' . $charset);
+        }
+    }
 }