void addPath (string path type, string directory)Adds a directory to the list of paths Text_Wiki searches for user-defined parse and render classes.

 
$wiki =& new Text_Wiki();
 
// add a user-defined "parse" path
$wiki->addPath('parse', '/path/to/parse/rules/');
 
// add a user-defined "render" path
$wiki->addPath('parse', '/path/to/render/classes/');

Text_Wiki searches these paths in last-in-first-out order; that is, paths are added to the "top" of the search stack. For example, if the default render search stack is …

  1. /original/path/… and you call addPath('render', '/path/to/custom/renders/'), the search stack will then look like this:
  2. /path/to/custom/renders/
  3. /original/path/The /path/to/custom/renders/ will be searched first, then fall back to /original/path/.
 
text_wiki/methodaddpath.txt · Last modified: 2008/09/16 11:49 (external edit)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki