Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Library of functions and constants for module wiki It contains the great majority of functions defined by Moodle that are mandatory to develop a module.

Author: Jordi Piguillem
Author: Marc Alier
Author: David Jimenez
Author: Josep Arus
Author: Kenneth Riba
Copyright: 2009 Marc Alier, Jordi Piguillem marc.alier@upc.edu
Copyright: 2009 Universitat Politecnica de Catalunya http://www.upc.edu
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 303 lines (9 kb)
Included or required:0 times
Referenced: 2 times
Includes or requires: 1 file
 mod/wiki/parser/utils.php

Defines 2 classes

wiki_parser_proxy:: (4 methods):
  parse()
  get_token()
  get_section()
  create_parser_instance()

generic_parser:: (14 methods):
  __construct()
  parse()
  set_options()
  process_block_rule()
  block_callback()
  rules()
  process_tag_rule()
  tag_callback()
  initialize_nowiki_index()
  initialize_nowiki_index_callback()
  protect()
  commit_nowiki_index()
  commit_nowiki_index_callback()
  get_token()


Class: wiki_parser_proxy  - X-Ref

Generic parser implementation

parse(&$string, $type, $options = array()   X-Ref
No description

get_token($name, $type)   X-Ref
No description

get_section(&$string, $type, $section, $allcontent = false)   X-Ref
No description

create_parser_instance($type)   X-Ref
No description

Class: generic_parser  - X-Ref

__construct()   X-Ref
No description

parse(&$string, $options = array()   X-Ref
Parse function


set_options($options)   X-Ref
Initialize options


process_block_rule($name, $block)   X-Ref
Block processing function & callbacks


block_callback($match)   X-Ref
No description

rules(&$text, $rules = null)   X-Ref
Rules processing function & callback


process_tag_rule($name, $rule, &$text)   X-Ref
No description

tag_callback($match)   X-Ref
No description

initialize_nowiki_index()   X-Ref
Special nowiki parser index


initialize_nowiki_index_callback($match)   X-Ref
No description

protect($text)   X-Ref
No description

commit_nowiki_index()   X-Ref
No description

commit_nowiki_index_callback($match)   X-Ref
No description

get_token($name)   X-Ref
Get token of the parsable element $name.