use PhpXmlRpc\PhpXmlRpc;
+/**
+ * @todo implement an interface
+ */
class Charset
{
// tables used for transcoding different charsets into us-ascii xml
'EUC-JP', 'EUC-', 'EUC-KR', 'EUC-CN',),
);
+ /** @var Charset $instance */
protected static $instance = null;
/**
* This class is singleton for performance reasons.
- * @todo can't we just make $xml_iso88591_Entities a static variable instead ?
+ * @todo should we just make $xml_iso88591_Entities a static variable instead ?
*
* @return Charset
*/
public static function instance()
{
if (self::$instance === null) {
- self::$instance = new self();
+ self::$instance = new static();
}
return self::$instance;
throw new \Exception('Unsupported charset: ' . $charset);
}
}
-
}