[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/Parsing/ -> Parser.php (summary)

(no description)

File Size: 131 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Parser:: (5 methods):
  __construct()
  addBaseMode()
  addMode()
  connectModes()
  parse()


Class: Parser  - X-Ref

Sets up the Lexer with modes and points it to the Handler
For an intro to the Lexer see: wiki:parser

__construct(Doku_Handler $handler)   X-Ref
dokuwiki\Parsing\Doku_Parser constructor.

param: Doku_Handler $handler

addBaseMode($BaseMode)   X-Ref
Adds the base mode and initialized the lexer

param: Base $BaseMode

addMode($name, ModeInterface $Mode)   X-Ref
Add a new syntax element (mode) to the parser

PHP preserves order of associative elements
Mode sequence is important

param: string $name
param: ModeInterface $Mode

connectModes()   X-Ref
Connect all modes with each other

This is the last step before actually parsing.

parse($doc)   X-Ref
Parses wiki syntax to instructions

param: string $doc the wiki syntax text
return: array instructions