registerFormatName('IDE-XML'); $this->setExt($this->config->ext === null ? ".xml" : $this->config->ext); } public function parseFunction() { $str = '' . PHP_EOL; $str .= '' . PHP_EOL; $str .= '' . $this->function['name'] . '' . PHP_EOL; $str .= '' . $this->e($this->function['purpose']) . '' . PHP_EOL; $str .= '' . $this->function['manualid'] . '' . PHP_EOL; $str .= '' . $this->e($this->function['version']) . '' . PHP_EOL; //Parameters $str .= '' . PHP_EOL; foreach ((array)$this->function['params'] as $param) { $str .= ' ' . PHP_EOL; $str .= ' ' . $param['name'] . '' . PHP_EOL; $str .= ' ' . $param['type'] . '' . PHP_EOL; $str .= ' ' . $param['optional'] . '' . PHP_EOL; if (isset($param['initializer'])) { $str .= ' ' . $param['initializer'] . '' . PHP_EOL; } $str .= ' ' . (isset($param['description']) ? $this->cdata_str($param['description']) : '') . '' . PHP_EOL; $str .= ' ' . PHP_EOL; } $str .= '' . PHP_EOL; //Return $str .= '' . PHP_EOL; $str .= ' ' . $this->function['return']['type'] . '' . PHP_EOL; $str .= ' ' . $this->cdata_str($this->function['return']['description']) . '' . PHP_EOL; $str .= '' . PHP_EOL; //Errors $str .= '' . PHP_EOL; $str .= ' ' . $this->cdata_str($this->function['errors']) . '' . PHP_EOL; $str .= '' . PHP_EOL; //Notes $str .= '' . PHP_EOL; foreach ((array)$this->function['notes'] as $note) { $str .= ' ' . PHP_EOL; $str .= ' ' . $note['type'] . '' . PHP_EOL; $str .= ' ' . $this->cdata_str($note['description']) . '' . PHP_EOL; $str .= ' ' . PHP_EOL; } $str .= '' . PHP_EOL; //Changelog $str .= '' . PHP_EOL; foreach ((array)$this->function['changelog'] as $entry) { $str .= ' ' . PHP_EOL; $str .= ' ' . $this->e($entry['version']) . '' . PHP_EOL; $str .= ' ' . $this->e($entry['change']) . '' . PHP_EOL; $str .= ' ' . PHP_EOL; } $str .= '' . PHP_EOL; //See also $str .= '' . PHP_EOL; foreach ((array)$this->function['seealso'] as $entry) { $str .= ' ' . PHP_EOL; $str .= ' ' . $this->e($entry['name']) . '' . PHP_EOL; $str .= ' ' . $entry['type'] . '' . PHP_EOL; $str .= ' ' . PHP_EOL; } $str .= '' . PHP_EOL; $str .= ''; return $str; } protected function e($data) { return htmlspecialchars($data, ENT_QUOTES, 'UTF-8'); } protected function cdata_str($data) { return ""; } }