Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Protected Member Functions | List of all members
base_nested_element Class Reference

Abstract class representing one nestable element (non final) piece of information. More...

Inheritance diagram for base_nested_element:
base_final_element base_atom backup_nested_element base_optigroup backup_logstore_database_nested_element backup_optigroup_element file_nested_element backup_optigroup backup_plugin_element backup_subplugin_element

Public Member Functions

 __construct ($name, $attributes=null, $final_elements=null)
 Constructor - instantiates one base_nested_element, specifying its basic info. More...
 
 add_attributes ($attributes)
 
 add_child ($element)
 
 add_final_elements ($final_elements)
 
 add_optigroup ($optigroup)
 
 clean_value ()
 
 clean_values ()
 
 destroy ()
 Destroy all circular references. More...
 
 get_attribute ($name)
 
 get_attributes ()
 Public API starts here.
 
 get_child ($name)
 
 get_children ()
 
 get_final_element ($name)
 
 get_final_elements ()
 Public API starts here.
 
 get_level ()
 
 get_name ()
 Public API starts here.
 
 get_optigroup ()
 
 get_parent ()
 
 get_value ()
 
 is_set ()
 
 set_value ($value)
 
 to_string ($showvalue=false)
 

Protected Member Functions

 add_used ($element)
 
 check_and_set_used ($element)
 
 find_element_by_path ($path)
 
 find_first_parent_by_name ($name)
 
 get_grandoptigroupelement_or_grandparent ()
 
 get_grandparent ()
 
 get_new_attribute ($name)
 Returns one instace of the @base_attribute class to work with when attributes are added simply by name. More...
 
 get_new_final_element ($name)
 Returns one instace of the @final_element class to work with when final_elements are added simply by name. More...
 
 get_used ()
 
 set_parent ($element)
 
 set_used ($used)
 
 validate_name ($name)
 

Detailed Description

Abstract class representing one nestable element (non final) piece of information.

Constructor & Destructor Documentation

◆ __construct()

base_nested_element::__construct (   $name,
  $attributes = null,
  $final_elements = null 
)

Constructor - instantiates one base_nested_element, specifying its basic info.

Parameters
string$namename of the element
array$attributesattributes this element will handle (optional, defaults to null)
array$final_elementsthis element will handle (optional, defaults to null)

Reimplemented in backup_nested_element, backup_logstore_database_nested_element, and base_optigroup.

Member Function Documentation

◆ add_attributes()

base_final_element::add_attributes (   $attributes)
inherited

Reimplemented in backup_optigroup_element, and base_optigroup.

◆ add_final_elements()

base_nested_element::add_final_elements (   $final_elements)

Reimplemented in base_optigroup.

◆ add_used()

base_nested_element::add_used (   $element)
protected

Reimplemented in base_optigroup.

◆ clean_value()

base_nested_element::clean_value ( )

Reimplemented from base_atom.

◆ clean_values()

base_nested_element::clean_values ( )

Reimplemented from base_final_element.

◆ destroy()

base_nested_element::destroy ( )

Destroy all circular references.

It helps PHP 5.2 a lot!

Reimplemented from base_final_element.

◆ get_level()

base_final_element::get_level ( )
inherited

Reimplemented in backup_optigroup_element, and base_optigroup.

◆ get_new_attribute()

base_final_element::get_new_attribute (   $name)
abstractprotectedinherited

Returns one instace of the @base_attribute class to work with when attributes are added simply by name.

Reimplemented in backup_final_element, backup_nested_element, backup_optigroup_element, and base_optigroup.

◆ get_new_final_element()

base_nested_element::get_new_final_element (   $name)
abstractprotected

Returns one instace of the @final_element class to work with when final_elements are added simply by name.

Reimplemented in backup_nested_element, backup_optigroup_element, and base_optigroup.

◆ get_value()

base_nested_element::get_value ( )

Reimplemented from base_atom.

◆ set_parent()

base_final_element::set_parent (   $element)
protectedinherited

Reimplemented in backup_optigroup_element, and base_optigroup.

◆ set_value()

base_nested_element::set_value (   $value)

Reimplemented from base_atom.

◆ to_string()

base_nested_element::to_string (   $showvalue = false)

Reimplemented from base_final_element.


The documentation for this class was generated from the following file: