Beispiel #1
0
 static function initEntities()
 {
     if (com_wiris_util_xml_WXmlUtils::$entities === null) {
         $e = com_wiris_util_xml_WEntities::$MATHML_ENTITIES;
         com_wiris_util_xml_WXmlUtils::$entities = new Hash();
         $start = 0;
         $mid = null;
         while (($mid = _hx_index_of($e, "@", $start)) !== -1) {
             $name = _hx_substr($e, $start, $mid - $start);
             $mid++;
             $start = _hx_index_of($e, "@", $mid);
             if ($start === -1) {
                 break;
             }
             $value = _hx_substr($e, $mid, $start - $mid);
             $num = Std::parseInt("0x" . $value);
             com_wiris_util_xml_WXmlUtils::$entities->set($name, "" . _hx_string_rec($num, ""));
             $start++;
             unset($value, $num, $name);
         }
     }
 }