function formatStatic($key) { if (!is_array($this->dictionary)) { /**没有静态区间标注*/ return ""; } $StaticKey = $this->getStaticKey(); if (!array_key_exists($key, $StaticKey)) { return ""; } $static = $StaticKey[$key]; $static = parent::getFileContents($static); $result = ""; foreach ($this->dictionary as $value => $note) { $name = $value; if ($this->note_type == self::NOTE_TYPE_AUTO && $key != Element::TYPE_KEY_STRING && !empty($note)) { $az = language_new_az($note); if (!empty($az) && preg_match("/^[a-zA-Z\\s]+\$/", $az)) { $name = $az; } } $name = strtoupper($this->name . "_type_{$name}"); $data = str_replace(Element::FORMAT_NOTE, $note, $static); $data = str_replace(Element::FORMAT_CLASS, $name, $data); $data = str_replace(Element::FORMAT_DATA_KEY, strval($value), $data); $result .= $data; } return Element::FORMAT_ENTER . $result . Element::FORMAT_ENTER; }