<?php require VECTORCMS_ROOT . 'Config' . DS . 'configure.php';

// Load the dossier
spl_autoload_register(function ($class) {
	$prefix = 'IntellexApps\\PHP\\UploadFile\\';
	if (strpos($class, $prefix) === 0) {
		$path = APP . 'Vendor' . DS . 'dossier' . DS . 'src' . DS . 'php' . DS . 'lib' . DS . str_replace('\\', DS, substr($class, strlen($prefix))) . '.php';
		if (file_exists($path)) {
			include $path;
			return;
		}
	}
});

// require './vendor/phpailer/src/Exception.php';
// require './vendor/PHPMailer/src/PHPMailer.php';
// require './vendor/PHPMailer/src/SMTP.php';

function __autoload($class_name){
    if(file_exists(ROOT . 'vendor/phpmailer/src/' . $class_name . '.php')) {
		require_once ROOT .'vendor/phpmailer/src/' . $class_name . '.php';;		
	} 
}

// Currency
registerAutoloadPrefix('Currency', 'Vendor/Settings');
registerAutoloadPrefix('Region', 'Vendor/Settings');
registerAutoloadPrefix('Settings', 'Vendor/Settings');

// Genability
registerAutoloadPrefix('Genability', 'Vendor/Genability');

// Helcim
registerAutoloadPrefix('Helcim', 'Vendor/Helcim');

// registerAutoloadPrefix('phpmailer', 'Vendor/phpmailer');
