[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/parser/ -> handler.php (summary)

(no description)

File Size: 1157 lines (36 kb)
Included or required: 1 time
Referenced: 1 time
Includes or requires: 0 files

Defines 1 class

Doku_Handler:: (54 methods):
  __construct()
  addCall()
  getCallWriter()
  setCallWriter()
  getStatus()
  setStatus()
  _addCall()
  addPluginCall()
  finalize()
  fetch()
  parse_highlight_options()
  nestingTag()
  plugin()
  base()
  header()
  notoc()
  nocache()
  linebreak()
  eol()
  hr()
  strong()
  emphasis()
  underline()
  monospace()
  subscript()
  superscript()
  deleted()
  footnote()
  listblock()
  unformatted()
  preformatted()
  quote()
  file()
  code()
  acronym()
  smiley()
  wordblock()
  entity()
  multiplyentity()
  singlequoteopening()
  singlequoteclosing()
  apostrophe()
  doublequoteopening()
  doublequoteclosing()
  camelcaselink()
  internallink()
  filelink()
  windowssharelink()
  media()
  rss()
  externallink()
  emaillink()
  table()
  Doku_Handler_Parse_Media()


Class: Doku_Handler  - X-Ref

Class Doku_Handler

__construct()   X-Ref
Doku_Handler constructor.


addCall($handler, $args, $pos)   X-Ref
Add a new call by passing it to the current CallWriter

param: string $handler handler method name (see mode handlers below)
param: mixed $args arguments for this call
param: int $pos byte position in the original source file

getCallWriter()   X-Ref
Accessor for the current CallWriter

return: CallWriterInterface

setCallWriter($callWriter)   X-Ref
Set a new CallWriter

param: CallWriterInterface $callWriter

getStatus($status)   X-Ref
Return the current internal status of the given name

param: string $status
return: mixed|null

setStatus($status, $value)   X-Ref
Set a new internal status

param: string $status
param: mixed $value

_addCall($handler, $args, $pos)   X-Ref
No description

addPluginCall($plugin, $args, $state, $pos, $match)   X-Ref
Similar to addCall, but adds a plugin call

param: string $plugin name of the plugin
param: mixed $args arguments for this call
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
param: string $match matched syntax

finalize()   X-Ref
Finishes handling

Called from the parser. Calls finalise() on the call writer, closes open
sections, rewrites blocks and adds document_start and document_end calls.

triggers: PARSER_HANDLER_DONE

fetch()   X-Ref
fetch the current call and advance the pointer to the next one

return: bool|mixed

parse_highlight_options($options)   X-Ref
Internal function for parsing highlight options.
$options is parsed for key value pairs separated by commas.
A value might also be missing in which case the value will simple
be set to true. Commas in strings are ignored, e.g. option="4,56"
will work as expected and will only create one entry.

param: string $options space separated list of key-value pairs,
return: array|null     Array of key-value pairs $array['key'] = 'value';

nestingTag($match, $state, $pos, $name)   X-Ref
Simplifies handling for the formatting tags which all behave the same

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
param: string $name actual mode name

plugin($match, $state, $pos, $pluginname)   X-Ref
Special plugin handler

This handler is called for all modes starting with 'plugin_'.
An additional parameter with the plugin name is passed. The plugin's handle()
method is called here

author: Andreas Gohr <andi@splitbrain.org>
param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
param: string $pluginname name of the plugin
return: bool mode handled?

base($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

header($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

notoc($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

nocache($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

linebreak($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

eol($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

hr($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

strong($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

emphasis($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

underline($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

monospace($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

subscript($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

superscript($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

deleted($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

footnote($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

listblock($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

unformatted($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

preformatted($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

quote($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

file($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

code($match, $state, $pos, $type = 'code')   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
param: string $type either 'code' or 'file'
return: bool mode handled?

acronym($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

smiley($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

wordblock($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

entity($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

multiplyentity($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

singlequoteopening($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

singlequoteclosing($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

apostrophe($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

doublequoteopening($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

doublequoteclosing($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

camelcaselink($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

internallink($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

filelink($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

windowssharelink($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

media($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

rss($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

externallink($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

emaillink($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

table($match, $state, $pos)   X-Ref

param: string $match matched syntax
param: int $state a LEXER_STATE_* constant
param: int $pos byte position in the original source file
return: bool mode handled?

Doku_Handler_Parse_Media($match)   X-Ref
No description