Lines Matching refs:this

28         $controller->register_hook('DOKUWIKI_STARTED', 'BEFORE', $this, 'beforeDokuwikiStarted');
29 $controller->register_hook('PARSER_HANDLER_DONE', 'AFTER', $this, 'afterParserHandlerDone');
30 $controller->register_hook('PARSER_CACHE_USE', 'BEFORE', $this, 'beforeParserCacheUse');
37 $fromConf = dirname(__FILE__) . '/style/' . $this->getConf('style') . '.less';
48 $this->reset();
49 $this->fixLayout($event);
56 $this->rewriter = new qna_instruction_rewriter();
57 $this->blockState = self::STATE_CLOSED;
58 $this->headerIndex = -1;
59 $this->headerTitle = '';
60 $this->headerLevel = 0;
61 $this->headerId = '';
62 $this->headerCheck = array();
75 $this->headerIndex = $i;
76 $this->headerTitle = $instruction[1][0];
77 $this->headerLevel = $instruction[1][1];
78 $this->headerId = sectionID($instruction[1][0], $this->headerCheck);
84 if ($this->blockState != self::STATE_CLOSED) {
85 $this->rewriter->insertBlockCall($i, 'close_block', 2);
86 $this->blockState = self::STATE_CLOSED;
93 $this->handlePluginQnaBlock($i, $instruction[1][1]);
97 $this->handlePluginQnaHeader($i);
104 if ($this->blockState != self::STATE_CLOSED) {
105 $this->rewriter->appendBlockCall('close_block', 2);
108 $this->rewriter->apply($event->data->calls);
117 if ($this->blockState != self::STATE_CLOSED) {
118 $this->rewriter->insertBlockCall($index, 'close_block', 2);
121 $this->rewriter->insertBlockCall($index, 'open_block');
122 $this->rewriter->setQuestionLevel($index, $this->headerLevel + 1);
123 $this->blockState = self::STATE_QUESTION;
127 switch ($this->blockState) {
129 $this->rewriter->delete($index);
134 $this->rewriter->insertBlockCall($index, 'close_block');
135 $this->blockState = self::STATE_ANSWER;
141 switch ($this->blockState) {
143 $this->rewriter->delete($index);
148 $this->rewriter->insertBlockCall($index, 'close_block');
149 $this->blockState = self::STATE_CLOSED;
164 if (($index - $this->headerIndex) < 4) {
166 $data[1] = $this->headerTitle;
167 $data[2] = $this->headerId;
168 $data[3] = $this->headerLevel;
170 $this->rewriter->insertHeaderCall($this->headerIndex, $data);
171 $this->rewriter->insertHeaderCall($this->headerIndex + 1, 'close');
174 $this->rewriter->delete($index);
190 $this->addDependencies($cache, array_keys($depends['rendering']));
220 $this->correction = array();
227 $this->correction[$index][] = array(self::DELETE);
234 …$this->correction[$index][] = array(self::INSERT, array('plugin', array($name, $data, $state, $tex…
242 $this->insertPluginCall($index, 'qna_block', array($data), DOKU_LEXER_SPECIAL);
254 $this->insertPluginCall($index, 'qna_header', $data, DOKU_LEXER_SPECIAL);
261 …$this->correction[-1][] = array(self::INSERT, array('plugin', array($name, $data, $state, $text)));
269 $this->appendPluginCall('qna_block', array($data), DOKU_LEXER_SPECIAL);
277 $this->correction[$index][] = array(self::SET_LEVEL, $level);
284 if (count($this->correction) > 0) {
285 $index = $this->getCorrectionIndex();
296 $this->applyCorrections($i, $instruction, $output);
305 if (array_key_exists(-1, $this->correction)) {
306 $this->applyAppend($output);
317 $result = array_keys($this->correction);
336 foreach ($this->correction[$index] as $correction) {
366 foreach ($this->correction[-1] as $correction) {