<commit_before><?php

namespace Cactus;

/**
 * Autoloading Cactus classes.
 *
 * @package    Cactus
 * @author     <NAME> <<EMAIL>> 
 */
class Autoloader
{
	/**
	 * Built in class autoloading based on the PSR-0 standards.
	 *
	 * @see    https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
	 *
	 * @param  string   $class   The name of the class to autoload
	 * @return boolean           Was the class found and loaded?
	 */
	public static function load($class)
	{
		$found = false;
		$class = ltrim($class, "\\");

		if (strtolower(substr($class, 0, 6)) != "cactus")
		{
			return false;
		}

		$base = dirname(__FILE__) . DIRECTORY_SEPARATOR;
		$file = $base . str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php';

		if (is_file($file))
		{
			include $file;
			$found = true;
		}

		return $found;
	}

	/**
	 * Registers the auto loader
	 */
	public static function register()
	{
		spl_autoload_register(array("\\Cactus\\Autoloader", "load"));
	}

	/**
	 * Unregisters the autoloader.
	 */
	public static function unregister()
	{
		spl_autoload_unregister(array("\\Cactus\\Autoloader", "load"));
	}

}<commit_msg>Fixing the autoloader now that it is in the cactus directory, where it should have been to start.<commit_after><?php

namespace Cactus;

/**
 * Autoloading Cactus classes.
 *
 * @package    Cactus
 * @author     <NAME> <<EMAIL>> 
 */
class Autoloader
{
	/**
	 * @var  string  The base path for file loading.
	 */
	public static $path = null;

	/**
	 * Built in class autoloading based on the PSR-0 standards.
	 *
	 * @see    https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
	 *
	 * @param  string   $class   The name of the class to autoload
	 */
	public static function load($class)
	{
		$class = ltrim($class, "\\");

		if (strtolower(substr($class, 0, 6)) != "cactus")
		{
			return false;
		}

		$file = static::$path . str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php';

		if (is_file($file))
		{
			include $file;
		}
	}

	/**
	 * Registers the auto loader
	 */
	public static function register()
	{
		spl_autoload_register(array(__CLASS__, "load"));
		static::$path = realpath(dirname(__FILE__).DIRECTORY_SEPARATOR."..") . DIRECTORY_SEPARATOR;
	}

	/**
	 * Unregisters the autoloader.
	 */
	public static function unregister()
	{
		spl_autoload_unregister(array(__CLASS__, "load"));
	}

}
{'fraction_non_alphanumeric': 0.1531950909860347, 'fraction_numerical': 0.0033855268726195515, 'mean_word_length': 3.1184668989547037, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '4984869', 'n_tokens_mistral': 919, 'n_tokens_neox': 842, 'n_words': 201}