Lexer->addEntryPattern('(?=.*?)',$mode,'plugin_pagestat_editpt'); } public function postConnect() { $this->Lexer->addExitPattern('','plugin_pagestat_editpt'); } /* public function connectTo($mode) { $this->Lexer->addEntryPattern($this->entry_pattern,$mode,'plugin_pagestat_'.$this->getPluginComponent());} public function connectTo($mode) { $this->Lexer->addSpecialPattern('',$mode,'plugin_now');} function connectTo($mode) { $this->Lexer->addEntryPattern('\+\+\+\+.*?\|(?=.*\+\+\+\+)',$mode,'plugin_folded_div'); } */ public function handle($match, $state, $pos, Doku_Handler $handler){ switch ($state) { case DOKU_LEXER_ENTER : $match = trim(substr($match,3,-1)); $arg_list = explode(" ",$match); $this->pg_count=$this->pg_count+1; return array($state, $arg_list,$this->pg_count-1); case DOKU_LEXER_UNMATCHED : return array($state, $match); case DOKU_LEXER_EXIT : return array($state, ''); } return array(); } public function render($mode, Doku_Renderer $renderer, $data) { // $data is what the function handle() return'ed. if($mode == 'xhtml'){ /** @var Doku_Renderer_xhtml $renderer */ list($state,$match,$count) = $data; switch ($state) { case DOKU_LEXER_ENTER : $arg_list = $match; $length = count($arg_list); if($length<1){ break; } $subname=$arg_list[0]; $arg_count=1; // $str = '
'; $pt_arg=implode(";",array_slice($arg_list,1)); $str2 =<< MYSTR2; $renderer->doc .= $str2; break; case DOKU_LEXER_UNMATCHED : $renderer->doc .= $renderer->_xmlEntities($match); break; case DOKU_LEXER_EXIT : $renderer->doc .= ""; break; } return true; } return false; } }