function get_global_database_handler
Search API
| 7.x db.inc | get_global_database_handler() |
| 6.x db.inc | get_global_database_handler() |
| 5.x misc.inc | get_global_database_handler() |
This method will return a globally-set DatabaseHandler object, creating it if it does not already exist. This is for efficiency reasons, so every module or method does not need to keep creating databasehandler objects (and re-connecting to the database).
82 calls to get_global_database_handler()
- admin.courses.inc in modules/
admin/ admin.courses.inc - admin.degrees.inc in modules/
admin/ admin.degrees.inc - admin.groups.inc in modules/
admin/ admin.groups.inc - admin.module in modules/
admin/ admin.module - The administrative configurations for FlightPath.
- admin_apply_draft_changes_form_submit in modules/
admin/ admin.module - Handles the actual moving of draft courses into production.
File
- includes/
misc.inc, line 1620 - This file contains misc functions for FlightPath
Code
function get_global_database_handler() {
$db = @$GLOBALS ["fp_global_database_handler"];
if (!is_object($db) || !is_object($db->pdo)) {
// Something isn't right, or it wasn't set correctly. Create a new connection.
$GLOBALS ["fp_global_database_handler"] = new DatabaseHandler();
}
return $GLOBALS ["fp_global_database_handler"];
}
