. * * This file is a part of iCalcreator. */ /** * autoload.php * * iCalcreator package autoloader * * @author Kjell-Inge Gustafsson, kigkonsult * @since 2.26.8 - 2019-04-09 */ /** * Do NOT alter or remove the constant!! */ define( 'ICALCREATOR_VERSION', 'iCalcreator 2.26.9' ); /** * load iCalcreator src and support classes and Traits */ spl_autoload_register( function( $class ) { static $SRC = 'src'; static $BS = '\\'; static $PHP = '.php'; static $PREFIX = 'Kigkonsult\\Icalcreator\\'; static $BASEDIR = null; if( is_null( $BASEDIR )) $BASEDIR = __DIR__ . DIRECTORY_SEPARATOR . $SRC . DIRECTORY_SEPARATOR; if( 0 != strncmp( $PREFIX, $class, 23 )) return false; $class = substr( $class, 23 ); if( false !== strpos( $class, $BS )) $class = str_replace( $BS, DIRECTORY_SEPARATOR, $class ); $file = $BASEDIR . $class . $PHP; if( file_exists( $file )) { require $file; return true; } return false; } ); /** * iCalcreator timezones add-on functionality functions, IF required? */ // include __DIR__ . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'iCal.tz.inc.php';