diff options
author | Andreas Gohr <andi@splitbrain.org> | 2005-07-30 23:51:56 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2005-07-30 23:51:56 +0200 |
commit | a46d0d658b98649869f6c9660e168af3940d7c30 (patch) | |
tree | 31bd3d6bd347602ae1e632be3c03b50b284a562d /inc/parserutils.php | |
parent | 1e694c4cf2863c5f7211a2e888f79249c9383696 (diff) | |
download | rpg-a46d0d658b98649869f6c9660e168af3940d7c30.tar.gz rpg-a46d0d658b98649869f6c9660e168af3940d7c30.tar.bz2 |
Changed pluginloading to use references
This patch allows the use of $this in syntax plugins to set internal variables
and let them remain between handle and render calls. Even when it is possible
now to use this method you should exchange data betwenn handler and render calls
by using the $data array only.
darcs-hash:20050730215156-7ad00-69ea79859360d9902533633395de3e1b677f6e46.gz
Diffstat (limited to 'inc/parserutils.php')
-rw-r--r-- | inc/parserutils.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/inc/parserutils.php b/inc/parserutils.php index 1bf36c5fd..e3bd04524 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -199,7 +199,7 @@ function p_get_parsermodes(){ global $PARSER_MODES; $obj = null; foreach($pluginlist as $p){ - plugin_load('syntax',$p,$obj); //load plugin into $obj + $obj =& plugin_load('syntax',$p); //load plugin into $obj $PARSER_MODES[$obj->getType()][] = "plugin_$p"; //register mode type //add to modes $modes[] = array( @@ -207,6 +207,7 @@ function p_get_parsermodes(){ 'mode' => "plugin_$p", 'obj' => $obj, ); + unset($obj); //remove the reference } } |