summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpierre.spring <pierre.spring@liip.ch>2008-10-22 16:02:09 +0200
committerpierre.spring <pierre.spring@liip.ch>2008-10-22 16:02:09 +0200
commit82d616353e4c3680d88f083eb6f88fe68de92904 (patch)
treecf6f1cf1100fd2303a169061a646f826fab2a2a5
parente13a4142a48afa307dcacd5146367cf8fd58ebc0 (diff)
downloadrpg-82d616353e4c3680d88f083eb6f88fe68de92904.tar.gz
rpg-82d616353e4c3680d88f083eb6f88fe68de92904.tar.bz2
parser: put match on the call stack
darcs-hash:20081022140209-c07ef-c4d27f3c581ee6ee7cedb886f9e5b2675503b817.gz
-rw-r--r--inc/parser/handler.php7
-rw-r--r--lib/plugins/syntax.php27
2 files changed, 4 insertions, 30 deletions
diff --git a/inc/parser/handler.php b/inc/parser/handler.php
index 72f6de490..2de8df7cb 100644
--- a/inc/parser/handler.php
+++ b/inc/parser/handler.php
@@ -29,8 +29,8 @@ class Doku_Handler {
$this->CallWriter->writeCall($call);
}
- function addPluginCall($plugin, $args, $state, $pos) {
- $call = array('plugin',array($plugin, $args, $state), $pos);
+ function addPluginCall($plugin, $args, $state, $pos, $match) {
+ $call = array('plugin',array($plugin, $args, $state, $match), $pos);
$this->CallWriter->writeCall($call);
}
@@ -80,11 +80,10 @@ class Doku_Handler {
$data = array($match);
$plugin =& plugin_load('syntax',$pluginname);
if($plugin != null){
- $plugin->setMatch($match);
$data = $plugin->handle($match, $state, $pos, $this);
}
if ($data !== false) {
- $this->addPluginCall($pluginname,$data,$state,$pos);
+ $this->addPluginCall($pluginname,$data,$state,$pos,$match);
}
return true;
}
diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php
index c3d659456..7ded173cd 100644
--- a/lib/plugins/syntax.php
+++ b/lib/plugins/syntax.php
@@ -22,8 +22,7 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode {
var $lang = array(); // array to hold language dependent strings, best accessed via ->getLang()
var $configloaded = false; // set to true by loadConfig() after loading plugin configuration variables
var $conf = array(); // array to hold plugin settings, best accessed via ->getConf()
- var $match = null; // string containing the match of a syntax plugin, accessed via
- // it's setters and getters setMatch() and getMatch()
+
/**
* General Info
*
@@ -267,29 +266,5 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode {
return $conf;
}
- /**
- * setMatch is the setter of the match string in a syntax plugin
- *
- * @author Pierre Spring <pierre.spring@liip.ch>
- * @param string $match
- * @access public
- * @return void
- */
- function setMatch($match)
- {
- $this->match = (string) $match;
- }
- /**
- * getMatch is the getter of the match string in a syntax plugin
- *
- * @author Pierre Spring <pierre.spring@liip.ch>
- * @access public
- * @return string
- */
- function getMatch()
- {
- return $this->match;
- }
-
}
//Setup VIM: ex: et ts=4 enc=utf-8 :