<?php
define('PODELI_CHECKOUT_SDK_ROOT_PATH', dirname(__FILE__).'/src');

function podeliSdkLoadClass($className)
{
	if (strncmp('Podeli\\Payment', $className, 14) === 0) {
		$path   = PODELI_CHECKOUT_SDK_ROOT_PATH;
		$length = 14;
	} else {
		return;
	}
	$path .= str_replace('\\', '/', substr($className, $length)) . '.php';
	if (file_exists($path)) {
		require $path;
	}
}

spl_autoload_register('podeliSdkLoadClass');
