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.

Differences Between: [Versions 401 and 402] [Versions 401 and 403]

(no description)

Copyright: 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 267 lines (9 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

XMLDBAction:: (11 methods):
  __construct()
  init()
  getDoesGenerate()
  getError()
  getOutput()
  getPostAction()
  getTitle()
  loadStrings()
  invoke()
  launch()
  upgrade_savepoint_php()


Class: XMLDBAction  - X-Ref

Main xmldb action clasee

Main xmldb action class. It implements all the basic
functionalities to be shared by each action.

__construct()   X-Ref
Constructor


init()   X-Ref
Init method, every subclass will have its own,
always calling the parent one


getDoesGenerate()   X-Ref
Returns the type of output of the file

return: bool

getError()   X-Ref
getError method, returns the last error string.
Used if the invoke() methods returns false

return: string

getOutput()   X-Ref
getOutput method, returns the output generated by the action.
Used after execution of the invoke() methods if they return true

return: string

getPostAction()   X-Ref
getPostAction method, returns the action to launch after executing
another one

return: string

getTitle()   X-Ref
getTitle method returns the title of the action (that is part
of the $str array attribute

return: string

loadStrings($strings)   X-Ref
loadStrings method, loads the required strings specified in the
array parameter

param: string[] $strings

invoke()   X-Ref
main invoke method, it sets the postaction attribute
if possible and checks sesskey_protected if needed


launch($action)   X-Ref
launch method, used to easily call invoke methods between actions

param: string $action
return: mixed

upgrade_savepoint_php($structure)   X-Ref
This function will generate the PHP code needed to
implement the upgrade_xxxx_savepoint() php calls in
upgrade code generated from the editor. It's used by
the view_structure_php and view_table_php actions

param: xmldb_structure structure object containing all the info
return: string PHP code to be used to mark a reached savepoint