X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2FHelper%2FCharset.php;h=8fdecb1dc3461825686ef04c0d5630220c3c079e;hb=dbcb9c168e60ad868fba442452bbddafee7cf684;hp=2ea370f92be7d2f75d5edc0fc4a53d533224f376;hpb=9d129d66ce5d2b75c77caa901db04d567088e37d;p=plcapi.git diff --git a/src/Helper/Charset.php b/src/Helper/Charset.php index 2ea370f..8fdecb1 100644 --- a/src/Helper/Charset.php +++ b/src/Helper/Charset.php @@ -4,6 +4,9 @@ namespace PhpXmlRpc\Helper; use PhpXmlRpc\PhpXmlRpc; +/** + * @todo implement an interface + */ class Charset { // tables used for transcoding different charsets into us-ascii xml @@ -27,18 +30,19 @@ class Charset '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; @@ -305,5 +309,4 @@ class Charset throw new \Exception('Unsupported charset: ' . $charset); } } - }