Source for file Function.php
Documentation is available at Function.php
// $Id: Function.php 206950 2006-02-11 07:16:37Z toggg $
class Text_Wiki_Render_Tiki_Function extends Text_Wiki_Render {
* Renders a token into text matching the requested format.
* @param array $options The "options" portion of the token (second
* @return string The text rendered from the token options.
extract($options); // name, access, return, params, throws
// build the baseline output
$output = $this->conf['format_main'];
$output = str_replace('%access', $this->textEncode ($access), $output);
$output = str_replace('%return', $this->textEncode ($return), $output);
$output = str_replace('%name', $this->textEncode ($name), $output);
// build the set of params
foreach ($params as $key => $val) {
// is there a default value?
$tmp = $this->conf['format_paramd'];
$tmp = $this->conf['format_param'];
// add the param elements
$tmp = str_replace('%type', $this->textEncode ($val['type']), $tmp);
$tmp = str_replace('%descr', $this->textEncode ($val['descr']), $tmp);
$tmp = str_replace('%default', $this->textEncode ($val['default']), $tmp);
// insert params into output
$tmp = implode($this->conf['list_sep'], $list);
// build the set of throws
foreach ($throws as $key => $val) {
$tmp = $this->conf['format_throws'];
$tmp = str_replace('%type', $this->textEncode ($val['type']), $tmp);
$tmp = str_replace('%descr', $this->textEncode ($val['descr']), $tmp);
// insert throws into output
$tmp = implode($this->conf['list_sep'], $list);
// close the div and return the output
Documentation generated on Mon, 11 Mar 2019 15:32:44 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|