Example #1
0
 /**
  * Die eigentliche Funktion des Autoloader
  *
  * @param	string	$class			Der Klassennamen
  * @return	bool
  */
 public static function autoloader($class)
 {
     if (self::classExists($class)) {
         return true;
     }
     preg_match_all("/(?:^|[A-Z])[a-z]+/", $class, $treffer);
     $classPath = implode(DIRECTORY_SEPARATOR, array_map('strtolower', $treffer[0]));
     if (isset(self::$classes[$class])) {
         if (is_readable(self::$classes[$class])) {
             self::addClass($class, self::$classes[$class]);
             if (self::classExists($class)) {
                 return true;
             }
         }
         // Datei im Cache drin, jedoch exsistiert sie nichtmehr
         unset(self::$classes[$class]);
         self::$isNewCache = true;
     }
     if (is_readable(dir::classes($classPath . '.php'))) {
         self::addClass($class, dir::classes($classPath . '.php'));
     }
     if (self::classExists($class)) {
         return true;
     }
     $classPath = self::$composer->findFile($class);
     if (!is_null($classPath)) {
         self::addClass($class, $classPath);
     }
     return self::classExists($class);
 }
Example #2
0
ob_implicit_flush(0);
mb_internal_encoding('UTF-8');
session_start();
if (version_compare(PHP_VERSION, 5.4) < 0) {
    echo 'PHP version 5.4 or higher needed!';
    exit;
}
include 'lib' . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'dir.php';
if (isset($DYN['root'])) {
    new dir($DYN['root']);
} else {
    new dir();
}
include dir::classes('autoload.php');
autoload::register();
autoload::addDir(dir::classes('utils'));
new dyn();
if (dyn::get('setup') == true) {
    header('Location: install/');
    exit;
}
if (isset($DYN['backend'])) {
    dyn::add('backend', $DYN['backend']);
} else {
    dyn::add('backend', true);
}
unset($DYN);
include dir::functions('html_stuff.php');
include dir::functions('url_stuff.php');
lang::setDefault();
lang::setLang(dyn::get('lang'));
Example #3
0
ob_implicit_flush(0);
mb_internal_encoding('UTF-8');
session_start();
if (version_compare(PHP_VERSION, 5.4) < 0) {
    echo 'PHP 5.4 or higher needed!';
    exit;
}
set_include_path(get_include_path() . PATH_SEPARATOR . 'lib/vendor/phpseclib');
include_once 'Net/SSH2.php';
include_once 'Net/SFTP.php';
define('NET_SSH2_LOGGING', NET_SSH2_LOG_COMPLEX);
include 'lib/classes/dir.php';
new dir();
include dir::classes('autoload.php');
autoload::register();
autoload::addDir(dir::classes('helper'));
new rp();
if (rp::get('setup') == true) {
    header('Location: install/');
    exit;
}
include dir::functions('html.php');
include dir::functions('convert.php');
lang::setDefault();
lang::setLang(rp::get('lang'));
$DB = rp::get('DB');
sql::connect($DB['host'], $DB['user'], $DB['password'], $DB['database']);
unset($DB);
date_default_timezone_set(rp::get('timezone', 'Europe/Berlin'));
new userLogin();
rp::add('user', new user(userLogin::getUser()));