Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
|
Main xmldb action clasee. More...
Public Member Functions | |
__construct () | |
Constructor. | |
getDoesGenerate () | |
Returns the type of output of the file. | |
getError () | |
getError method, returns the last error string. | |
getOutput () | |
getOutput method, returns the output generated by the action. | |
getPostAction () | |
getPostAction method, returns the action to launch after executing another one | |
getTitle () | |
getTitle method returns the title of the action (that is part of the $str array attribute | |
init () | |
Init method, every subclass will have its own, always calling the parent one. | |
invoke () | |
main invoke method, it sets the postaction attribute if possible and checks sesskey_protected if needed | |
launch ($action) | |
launch method, used to easily call invoke methods between actions | |
loadStrings ($strings) | |
loadStrings method, loads the required strings specified in the array parameter | |
upgrade_savepoint_php ($structure) | |
This function will generate the PHP code needed to implement the upgrade_xxxx_savepoint() php calls in upgrade code generated from the editor. | |
Protected Attributes | |
bool | $can_subaction |
Set own core attributes. | |
bool | $does_generate |
Type of value returned by the invoke method, ACTION_GENERATE_HTML have contents to show, set by each specialized invoke. | |
string | $errormsg |
Last Error produced. | |
string | $output |
Output of the action, set by each specialized invoke, get with getOutput. | |
string | $postaction |
Action to execute at the end of the invoke script. | |
bool | $sesskey_protected |
Actions must be protected by sesskey mechanism. | |
string | $str |
Strings used by the action set by each specialized init, calling loadStrings. | |
mixed | $subaction |
string | $title |
Title of the Action (class name, by default), set by parent init automatically. | |
Main xmldb action clasee.
Main xmldb action class. It implements all the basic functionalities to be shared by each action.
XMLDBAction::getDoesGenerate | ( | ) |
Returns the type of output of the file.
bool |
XMLDBAction::getError | ( | ) |
getError method, returns the last error string.
Used if the invoke() methods returns false
string |
XMLDBAction::getOutput | ( | ) |
getOutput method, returns the output generated by the action.
Used after execution of the invoke() methods if they return true
string |
XMLDBAction::getPostAction | ( | ) |
getPostAction method, returns the action to launch after executing another one
string |
XMLDBAction::getTitle | ( | ) |
getTitle method returns the title of the action (that is part of the $str array attribute
string |
Reimplemented in add_persistent_mandatory.
XMLDBAction::init | ( | ) |
Init method, every subclass will have its own, always calling the parent one.
Reimplemented in add_persistent_mandatory, check_bigints, check_defaults, check_foreign_keys, check_indexes, check_oracle_semantics, create_xml_file, delete_field, delete_index, delete_key, delete_table, delete_xml_file, edit_field, edit_field_save, edit_index, edit_index_save, edit_key, edit_key_save, edit_table, edit_table_save, edit_xml_file, edit_xml_file_save, generate_all_documentation, generate_documentation, get_db_directories, load_xml_file, load_xml_files, main_view, move_updown_field, move_updown_index, move_updown_key, move_updown_table, new_field, new_index, new_key, new_table, new_table_from_mysql, reconcile_files, revert_changes, save_xml_file, template, unload_xml_file, view_field_xml, view_index_xml, view_key_xml, view_reserved_words, view_structure_php, view_structure_sql, view_structure_xml, view_table_php, view_table_sql, view_table_xml, view_xml, and XMLDBCheckAction.
XMLDBAction::invoke | ( | ) |
main invoke method, it sets the postaction attribute if possible and checks sesskey_protected if needed
Reimplemented in add_persistent_mandatory, create_xml_file, delete_field, delete_index, delete_key, delete_table, delete_xml_file, edit_field, edit_field_save, edit_index, edit_index_save, edit_key, edit_key_save, edit_table, edit_table_save, edit_xml_file, edit_xml_file_save, generate_all_documentation, generate_documentation, get_db_directories, load_xml_file, load_xml_files, main_view, move_updown_field, move_updown_index, move_updown_key, move_updown_table, new_field, new_index, new_key, new_table, new_table_from_mysql, reconcile_files, revert_changes, save_xml_file, template, unload_xml_file, view_field_xml, view_index_xml, view_key_xml, view_reserved_words, view_structure_php, view_structure_sql, view_structure_xml, view_table_php, view_table_sql, view_table_xml, view_xml, and XMLDBCheckAction.
XMLDBAction::launch | ( | $action | ) |
launch method, used to easily call invoke methods between actions
string | $action |
mixed |
XMLDBAction::loadStrings | ( | $strings | ) |
loadStrings method, loads the required strings specified in the array parameter
string[] | $strings |
XMLDBAction::upgrade_savepoint_php | ( | $structure | ) |
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
xmldb_structure | structure object containing all the info |
string | PHP code to be used to mark a reached savepoint |
|
protected |
Last Error produced.
Check when any invoke returns false, get with getError