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: 166 lines (5 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 4 classes

base_atom:: (8 methods):
  __construct()
  validate_name()
  get_name()
  get_value()
  set_value()
  clean_value()
  is_set()
  to_string()

base_atom_exception:: (1 method):
  __construct()

base_atom_struct_exception:: (1 method):
  __construct()

base_atom_content_exception:: (1 method):
  __construct()


Class: base_atom  - X-Ref

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

__construct($name)   X-Ref
Constructor - instantiates one base_atom, specifying its basic info.

param: string $name name of the element
param: string $value optional value of the element

validate_name($name)   X-Ref
No description

get_name()   X-Ref
No description

get_value()   X-Ref
No description

set_value($value)   X-Ref
No description

clean_value()   X-Ref
No description

is_set()   X-Ref
No description

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

Class: base_atom_exception  - X-Ref

base_atom abstract exception class

This exceptions will be used by all the base_atom classes
in order to detect any problem or miss-configuration
__construct($errorcode, $a = null, $debuginfo = null)   X-Ref
Constructor - instantiates one base_atom_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_atom_struct_exception  - X-Ref

base_atom exception to control all the errors while creating the objects

This exception will be thrown each time the base_atom class detects some
inconsistency related with the creation of objects and their attributes
(wrong names)
__construct($errorcode, $a = null, $debuginfo = null)   X-Ref
Constructor - instantiates one base_atom_struct_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_atom_content_exception  - X-Ref

base_atom exception to control all the errors while setting the values

This exception will be thrown each time the base_atom class detects some
inconsistency related with the creation of contents (values) of the objects
(bad contents, setting without cleaning...)
__construct($errorcode, $a = null, $debuginfo = null)   X-Ref
Constructor - instantiates one base_atom_content_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