lib/moodlelib.php
From MoodleDocs
moodlelib.php is the main library file of miscellaneous general-purpose Moodle functions.
Other main libraries:
* - weblib.php - functions that produce web output * - datalib.php - functions that access the database