PluginProbe
Import Social Events / 1.9.0
Import Social Events v1.9.0
1.9.1 1.9.0 trunk 1.0.0 1.0.1 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.2.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.6.0 1.6.1 1.6.10 1.6.11 1.6.12 All 61 releases
import-facebook-events / includes / lib / icalcreator / autoload.php

autoload.php in Import Social Events 1.9.0, at includes/lib/icalcreator/autoload.php

78 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit;
4 }
5 /**
6 * iCalcreator, the PHP class package managing iCal (rfc2445/rfc5445) calendar information.
7 *
8 * Copyright (c) 2007-2021 Kjell-Inge Gustafsson, kigkonsult, All rights reserved
9 * Link https://kigkonsult.se
10 * Package iCalcreator
11 * Version 2.30.10
12 * License Subject matter of licence is the software iCalcreator.
13 * The above copyright, link, package and version notices,
14 * this licence notice and the invariant [rfc5545] PRODID result use
15 * as implemented and invoked in iCalcreator shall be included in
16 * all copies or substantial portions of the iCalcreator.
17 *
18 * iCalcreator is free software: you can redistribute it and/or modify
19 * it under the terms of the GNU Lesser General Public License as published
20 * by the Free Software Foundation, either version 3 of the License,
21 * or (at your option) any later version.
22 *
23 * iCalcreator is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU Lesser General Public License for more details.
27 *
28 * You should have received a copy of the GNU Lesser General Public License
29 * along with iCalcreator. If not, see <https://www.gnu.org/licenses/>.
30 *
31 * This file is a part of iCalcreator.
32 */
33 /**
34 * autoload.php
35 *
36 * iCalcreator package autoloader
37 *
38 * @author Kjell-Inge Gustafsson, kigkonsult <ical@kigkonsult.se>
39 * @since 2.30.10 - 2021-12-01
40 */
41 /**
42 * Do NOT alter or remove the constant!!
43 */
44 define( 'ICALCREATOR_VERSION', 'iCalcreator 2.30.10' );
45 /**
46 * load iCalcreator src and support classes and Traits
47 */
48 spl_autoload_register(
49 function( $class ) {
50 static $BS = '\\';
51 static $PHP = '.php';
52 static $PREFIX = 'Kigkonsult\\Icalcreator\\';
53 static $SRC = 'src';
54 static $SRCDIR = null;
55 static $TEST = 'test';
56 static $TESTDIR = null;
57 if( is_null( $SRCDIR )) {
58 $SRCDIR = __DIR__ . DIRECTORY_SEPARATOR . $SRC . DIRECTORY_SEPARATOR;
59 $TESTDIR = __DIR__ . DIRECTORY_SEPARATOR . $TEST . DIRECTORY_SEPARATOR;
60 }
61 if( 0 != strncmp( $PREFIX, $class, 23 ))
62 return false;
63 $class = substr( $class, 23 );
64 if( false !== strpos( $class, $BS ))
65 $class = str_replace( $BS, DIRECTORY_SEPARATOR, $class );
66 $file = $SRCDIR . $class . $PHP;
67 if( file_exists( $file )) {
68 include $file;
69 }
70 else {
71 $file = $TESTDIR . $class . $PHP;
72 if( file_exists( $file )) {
73 include $file;
74 }
75 }
76 }
77 );
78