<commit_before><?php

function __autoload($class_name) {
	$classType = substr($class_name, 0, stripos($class_name, '_'));
	
	switch($classType) {
		case 'SpotPage'		: require_once 'lib/page/' . $class_name . '.php'; break;
		case 'SpotStruct'	: require_once 'lib/dbstruct/' . $class_name . '.php'; break;
		case 'SpotRetriever': require_once 'lib/retriever/' . $class_name . '.php'; break;
		case 'dbeng'		: require_once 'lib/dbeng/' . $class_name . '.php'; break;
		case 'dbfts'		: require_once 'lib/dbeng/' . $class_name . '.php'; break;
		case 'NzbHandler'	: require_once 'lib/nzbhandler/' . $class_name . '.php'; break;
		case 'Notifications': require_once 'lib/notifications/' . $class_name . '.php'; break;
		case 'Gettext'		: require_once 'lib/gettext/' . $class_name . '.php'; break;
		case 'Crypt'		: break; /* Crypt/Random.php uses class_exist to find a random generator, this triggers autoload */
		case 'SpotUbb'		: {
				require_once "lib/ubb/SpotUbb_parser.php";
				require_once "lib/ubb/TagHandler.inc.php";
				break;
		} # ubb
		case 'Mobile'		: {
			if ($class_name == 'Mobile_Detect') {
				require_once "Mobile_Detect.php";
			} # if

			break;
		} # 'Mobile'<commit_msg>Add autoloader support for the Dao system<commit_after><?php

function __autoload($class_name) {
	$classType = substr($class_name, 0, stripos($class_name, '_'));
	
	switch($classType) {
		case 'SpotPage'		: require_once 'lib/page/' . $class_name . '.php'; break;
		case 'SpotStruct'	: require_once 'lib/dbstruct/' . $class_name . '.php'; break;
		case 'SpotRetriever': require_once 'lib/retriever/' . $class_name . '.php'; break;
		case 'dbeng'		: require_once 'lib/dbeng/' . $class_name . '.php'; break;
		case 'dbfts'		: require_once 'lib/dbeng/' . $class_name . '.php'; break;
		case 'NzbHandler'	: require_once 'lib/nzbhandler/' . $class_name . '.php'; break;
		case 'Notifications': require_once 'lib/notifications/' . $class_name . '.php'; break;
		case 'Gettext'		: require_once 'lib/gettext/' . $class_name . '.php'; break;
		case 'Crypt'		: break; /* Crypt/Random.php uses class_exist to find a random generator, this triggers autoload */
		case 'SpotUbb'		: {
				require_once "lib/ubb/SpotUbb_parser.php";
				require_once "lib/ubb/TagHandler.inc.php";
				break;
		} # ubb
		case 'Dao'			: {
			$parts = explode("_", $class_name);

			if (count($parts) == 2) {
				require_once ('lib/dao/' . $class_name . '.php');
			} else {
				require_once ('lib/dao/' . $parts[1] . '/' . $class_name . '.php');
			} # else
			break;
		} # dao
		case 'Mobile'		: {
			if ($class_name == 'Mobile_Detect') {
				require_once "Mobile_Detect.php";
			} # if

			break;
		} # 'Mobile'
{'fraction_non_alphanumeric': 0.17378277153558053, 'fraction_numerical': 0.00149812734082397, 'mean_word_length': 3.5042158516020234, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '325477', 'n_tokens_mistral': 1093, 'n_tokens_neox': 984, 'n_words': 218}