Home
last modified time | relevance | path

Searched refs:handler (Results 1 – 25 of 44) sorted by relevance

12

/dokuwiki/_test/tests/Parsing/
H A DHandlerTest.php12 $handler = new Handler();
18 public function handle($match, $state, $pos, Handler $handler) argument
20 $this->receivedModeName = $handler->getModeName();
25 $handler->registerModeObject('resolved', $mode);
28 $handler->handleToken('resolved', 'test', DOKU_LEXER_SPECIAL, 0, 'original');
35 $handler = new Handler();
40 public function handle($match, $state, $pos, Handler $handler) argument
42 $this->receivedModeName = $handler->getModeName();
47 $handler->registerModeObject('mymode', $mode);
50 $handler->handleToken('mymode', 'test', DOKU_LEXER_SPECIAL, 0);
[all …]
/dokuwiki/inc/Parsing/ParserMode/
H A DTable.php56 public function handle($match, $state, $pos, Handler $handler) argument
60 $handler->setCallWriter(new TableHandler($handler->getCallWriter()));
62 $handler->addCall('table_start', [$pos + 1], $pos);
64 $handler->addCall('tableheader', [], $pos);
66 $handler->addCall('tablecell', [], $pos);
71 $handler->addCall('table_end', [$pos], $pos);
73 $reWriter = $handler->getCallWriter();
74 $handler->setCallWriter($reWriter->process());
79 $handler->addCall('cdata', [$match], $pos);
85 $handler->addCall('cdata', [$match], $pos);
[all …]
H A DFootnote.php53 public function handle($match, $state, $pos, Handler $handler) argument
59 if ($handler->getStatus('footnote')) {
60 $handler->addCall('cdata', [$match], $pos);
63 $handler->setStatus('footnote', true);
65 $handler->setCallWriter(new Nest($handler->getCallWriter(), 'footnote_close'));
66 $handler->addCall('footnote_open', [], $pos);
70 if (!$handler->getStatus('footnote')) {
71 $handler->addCall('cdata', [$match], $pos);
75 $handler->setStatus('footnote', false);
76 $handler->addCall('footnote_close', [], $pos);
[all …]
H A DQuote.php44 public function handle($match, $state, $pos, Handler $handler) argument
48 $handler->setCallWriter(new QuoteHandler($handler->getCallWriter()));
49 $handler->addCall('quote_start', [$match], $pos);
53 $handler->addCall('quote_end', [], $pos);
55 $reWriter = $handler->getCallWriter();
56 $handler->setCallWriter($reWriter->process());
60 $handler->addCall('quote_newline', [$match], $pos);
64 $handler->addCall('cdata', [$match], $pos);
H A DPreformatted.php38 public function handle($match, $state, $pos, Handler $handler) argument
42 $handler->setCallWriter(new PreformattedHandler($handler->getCallWriter()));
43 $handler->addCall('preformatted_start', [], $pos);
46 $handler->addCall('preformatted_end', [], $pos);
48 $reWriter = $handler->getCallWriter();
49 $handler->setCallWriter($reWriter->process());
52 $handler->addCall('preformatted_newline', [], $pos);
55 $handler->addCall('preformatted_content', [$match], $pos);
H A DListblock.php55 public function handle($match, $state, $pos, Handler $handler) argument
59 $handler->setCallWriter(new Lists($handler->getCallWriter()));
60 $handler->addCall('list_open', [$match], $pos);
63 $handler->addCall('list_close', [], $pos);
65 $reWriter = $handler->getCallWriter();
66 $handler->setCallWriter($reWriter->process());
69 $handler->addCall('list_item', [$match], $pos);
72 $handler->addCall('cdata', [$match], $pos);
H A DHeader.php27 public function handle($match, $state, $pos, Handler $handler) argument
36 if ($handler->getStatus('section')) $handler->addCall('section_close', [], $pos);
38 $handler->addCall('header', [$title, $level, $pos], $pos);
40 $handler->addCall('section_open', [$level], $pos);
41 $handler->setStatus('section', true);
H A DQuotes.php66 public function handle($match, $state, $pos, Handler $handler) argument
68 $call = $handler->getModeName();
70 if ($call === 'doublequoteclosing' && $handler->getStatus('doublequote') <= 0) {
75 $handler->setStatus('doublequote', $handler->getStatus('doublequote') + 1);
77 $handler->setStatus('doublequote', max(0, $handler->getStatus('doublequote') - 1));
80 $handler->addCall($call, [], $pos);
H A DInternallink.php24 public function handle($match, $state, $pos, Handler $handler) argument
42 $handler->addCall(
49 $handler->addCall(
56 $handler->addCall(
63 $handler->addCall(
70 $handler->addCall(
77 $handler->addCall(
H A DAbstractFormatting.php74 public function handle($match, $state, $pos, Handler $handler) argument
78 DOKU_LEXER_ENTER => $handler->addCall($name . '_open', [], $pos),
79 DOKU_LEXER_EXIT => $handler->addCall($name . '_close', [], $pos),
80 DOKU_LEXER_UNMATCHED => $handler->addCall('cdata', [$match], $pos),
H A DNocache.php22 public function handle($match, $state, $pos, Handler $handler) argument
24 $handler->addCall('nocache', [], $pos);
H A DLinebreak.php22 public function handle($match, $state, $pos, Handler $handler) argument
24 $handler->addCall('linebreak', [], $pos);
H A DHr.php22 public function handle($match, $state, $pos, Handler $handler) argument
24 $handler->addCall('hr', [], $pos);
H A DNotoc.php22 public function handle($match, $state, $pos, Handler $handler) argument
24 $handler->addCall('notoc', [], $pos);
H A DCamelcaselink.php26 public function handle($match, $state, $pos, Handler $handler) argument
28 $handler->addCall('camelcaselink', [$match], $pos);
H A DModeInterface.php55 * @param Handler $handler The handler (for addCall, status, etc.)
58 public function handle($match, $state, $pos, Handler $handler); argument
H A DMultiplyentity.php30 public function handle($match, $state, $pos, Handler $handler) argument
33 $handler->addCall('multiplyentity', [$matches[0][0], $matches[0][1]], $pos);
H A DEol.php28 public function handle($match, $state, $pos, Handler $handler) argument
30 $handler->addCall('eol', [], $pos);
H A DWindowssharelink.php34 public function handle($match, $state, $pos, Handler $handler) argument
36 $handler->addCall('windowssharelink', [$match, null], $pos);
H A DEmaillink.php23 public function handle($match, $state, $pos, Handler $handler) argument
26 $handler->addCall('emaillink', [$email, null], $pos);
H A DFilelink.php41 public function handle($match, $state, $pos, Handler $handler) argument
43 $handler->addCall('filelink', [$match, null], $pos);
H A DUnformatted.php31 public function handle($match, $state, $pos, Handler $handler) argument
34 $handler->addCall('unformatted', [$match], $pos);
/dokuwiki/_test/tests/Parsing/Lexer/
H A DLexerTest.php11 $handler = new RecordingHandler();
12 $lexer = new Lexer($handler);
14 $this->assertSame([], $handler->recorded);
19 $handler = new RecordingHandler();
20 $lexer = new Lexer($handler);
23 $this->assertSame([], $handler->recorded);
28 $handler = new RecordingHandler();
29 $lexer = new Lexer($handler);
41 ], $handler->recorded);
46 $handler = new RecordingHandler();
[all …]
/dokuwiki/inc/Parsing/
H A DParser.php17 protected $handler; variable in dokuwiki\\Parsing\\Parser
31 * @param Handler $handler
33 public function __construct(Handler $handler) argument
35 $this->handler = $handler;
47 $this->lexer = new Lexer($this->handler, 'base', true);
50 $this->handler->registerModeObject('base', $BaseMode);
69 $this->handler->registerModeObject($name, $Mode);
119 if (!method_exists($this->handler, 'finalize')) {
124 $this->handler::class . '::_finalize()',
129 $this->handler->_finalize();
[all …]
/dokuwiki/inc/Parsing/Lexer/
H A DLexer.php31 protected $handler; variable in dokuwiki\\Parsing\\Lexer\\Lexer
42 * @param Handler $handler Handling strategy by reference.
46 public function __construct($handler, $start = "accept", $case = false) argument
49 $this->handler = $handler;
125 * @param string $handler New target handler.
127 public function mapHandler($mode, $handler) argument
129 $this->mode_handlers[$mode] = $handler;
143 if (! isset($this->handler)) {
271 return $this->handler->handleToken($modeName, $content, $is_match, $pos, $originalName);

12