.. segalanya bermula di sini ..
Posts tagged enableRule
Text_Wiki : getRenderConf()
Dec 16th
void getRenderConf (string format name, string rule name [, string conf key])
Gets the value of a configuration key for a rule rendered in a specific format; if no key is specified, gets the entire configuration array.
$wiki =& new Text_Wiki();
// get the list of pages that the wikilink rule knows about
$dir = $wiki->getRenderConf(’Xhtml’, ‘Wikilink’, ‘pages’);
// get all configs for the “Xhtml” format “wikilink” rule
$conf = $wiki->getRenderConf(’Xhtml’, ‘Wikilink’);
?>
Text_Wiki:MethodGetRenderConf (pmjones)
Thu, 12 Aug 2004, 21:35
Text_Wiki : getSource()
Dec 16th
getSource
string getSource ()
Gets the value of the $source property; i.e., the source text after all rules have been applied and matching rules have replaced source text with delimited tokens. This is generally useful only after parse() has been called.
// [snip] create a Text_Wiki object called $wiki
// [snip] load some source text into $text
$wiki->parse($text);
$source_with_delimited_tokens = $wiki->getSource();
?>
Text_Wiki : setParseConf()
Dec 16th
setParseConf
Set one key at a time
void setParseConf (string rule name, string conf key, mixed conf value)
Set all keys at once
void setParseConf (string rule name, array conf key-value pairs)
Set the configuration for a rule parser. For example, to tell the “include” rule what base path to use for scripts:
$wiki =& new Text_Wiki();
$wiki->setParseConf(’include’, ‘base’, ‘/path/to/scripts’);
?>
Note: Most rules use “render” configurations, not parse configurations.

