trfrm_func = array(); $this->stack = new Stack; } /** * Register transformation functions * * This should be done *before* calling do_transform * * @param $type enum
*
WT_MODE_MARKUP
*
If one WT_MODE_MARKUP really sets the html mode, then * all successive WT_MODE_MARKUP functions are skipped.
*
WT_TOKENIZER
*
The transformer function is called once for each match * of the $regexp in the line. The matched values are tokenized * to protect them from further transformation.
* * @param $function string Function name * @param $regexp string Required for WT_TOKENIZER functions. * Optional for others. If given, the transformer function will only be * called if the line matches the $regexp. */ function register($type, $function, $regexp = false) { $this->trfrm_func[] = array ($type, $function, $regexp); } /** * Sets current mode like list, preformatted text, plain text * * Takes care of closing (open) tags * * This is a helper function used to keep track of what HTML * block-level element we are currently processing. * Block-level elements are things like paragraphs "

", * pre-formatted text "

", and the various list elements:
    * "