Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

(no description)

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

Defines 3 classes

base_final_element:: (14 methods):
  __construct()
  destroy()
  set_parent()
  get_grandparent()
  get_grandoptigroupelement_or_grandparent()
  find_element_by_path()
  find_first_parent_by_name()
  get_attributes()
  get_attribute()
  get_parent()
  get_level()
  add_attributes()
  clean_values()
  to_string()

base_element_parent_exception:: (1 method):
  __construct()

base_element_attribute_exception:: (1 method):
  __construct()


Class: base_final_element  - X-Ref

Abstract class representing one final element atom (name/value/parent) piece of information

__construct($name, $attributes = null)   X-Ref
Constructor - instantiates one base_final_element, specifying its basic info.

param: string $name name of the element
param: array  $attributes attributes this element will handle (optional, defaults to null)

destroy()   X-Ref
Destroy all circular references. It helps PHP 5.2 a lot!


set_parent($element)   X-Ref
No description

get_grandparent()   X-Ref
No description

get_grandoptigroupelement_or_grandparent()   X-Ref
No description

find_element_by_path($path)   X-Ref
No description

find_first_parent_by_name($name)   X-Ref
No description

get_attributes()   X-Ref
No description

get_attribute($name)   X-Ref
No description

get_parent()   X-Ref
No description

get_level()   X-Ref
No description

add_attributes($attributes)   X-Ref
No description

clean_values()   X-Ref
No description

to_string($showvalue = false)   X-Ref
No description

Class: base_element_parent_exception  - X-Ref

base_element exception to control all the errors related with parents handling

__construct($errorcode, $a = null, $debuginfo = null)   X-Ref
Constructor - instantiates one base_element_parent_exception

param: string $errorcode key for the corresponding error string
param: object $a extra words and phrases that might be required in the error string
param: string $debuginfo optional debugging information

Class: base_element_attribute_exception  - X-Ref

base_element exception to control all the errors related with attributes handling

__construct($errorcode, $a = null, $debuginfo = null)   X-Ref
Constructor - instantiates one base_element_attribute_exception

param: string $errorcode key for the corresponding error string
param: object $a extra words and phrases that might be required in the error string
param: string $debuginfo optional debugging information