<commit_before><?php

/**
 * This file implements a autoloader for simpleSAMLphp. This autoloader
 * will search for files under the simpleSAMLphp directory.
 *
 * @author <NAME>, UNINETT AS.
 * @package simpleSAMLphp
 * @version $Id$
 */


/**
 * Autoload function for simpleSAMLphp.
 *
 * It will autoload all classes stored in the lib-directory.
 *
 * @param $className  The name of the class.
 */
function SimpleSAML_autoload($className) {

	$libDir = dirname(__FILE__) . '/';

	/* Special handling for xmlseclibs.php. */
	if(in_array($className, array('XMLSecurityKey', 'XMLSecurityDSig', 'XMLSecEnc'), TRUE)) {
		require_once($libDir . 'xmlseclibs.php');
		return;
	}

	$file = $libDir . str_replace('_', '/', $className) . '.php';
	if(file_exists($file)) {
		require_once($file);
	}
}

/* Register autload function for simpleSAMLphp. */
spl_autoload_register('SimpleSAML_autoload');

?><commit_msg>Autoloader: Added backwards-compatibility for PHP versions without spl_autoload_register.<commit_after><?php

/**
 * This file implements a autoloader for simpleSAMLphp. This autoloader
 * will search for files under the simpleSAMLphp directory.
 *
 * @author <NAME>, UNINETT AS.
 * @package simpleSAMLphp
 * @version $Id$
 */


/**
 * Autoload function for simpleSAMLphp.
 *
 * It will autoload all classes stored in the lib-directory.
 *
 * @param $className  The name of the class.
 */
function SimpleSAML_autoload($className) {

	$libDir = dirname(__FILE__) . '/';

	/* Special handling for xmlseclibs.php. */
	if(in_array($className, array('XMLSecurityKey', 'XMLSecurityDSig', 'XMLSecEnc'), TRUE)) {
		require_once($libDir . 'xmlseclibs.php');
		return;
	}

	$file = $libDir . str_replace('_', '/', $className) . '.php';
	if(file_exists($file)) {
		require_once($file);
	}
}

/* Register autoload function for simpleSAMLphp. */
if(function_exists('spl_autoload_register')) {
	/* Use the spl_autoload_register function if it is available. It should be available
	 * for PHP versions >= 5.1.2.
	 */
	spl_autoload_register('SimpleSAML_autoload');
} else {

	/* spl_autoload_register is unavailable - let us hope that no one else uses the __autoload function. */

	/**
	 * Autoload function for those who don't have spl_autoload_register.
	 *
	 * @param $className  The name of the requested class.
	 */
	function __autoload($className) {
		SimpleSAML_autoload($className);
	}
}

?>
{'fraction_non_alphanumeric': 0.13316582914572864, 'fraction_numerical': 0.001256281407035176, 'mean_word_length': 4.262114537444934, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '5854860', 'n_tokens_mistral': 835, 'n_tokens_neox': 794, 'n_words': 208}