示例#1
0
            return;
        }
        /**
         * If error level falls within our
         * error reporting mask, then throw an ErrorException
         */
        if ($errLevel & $errno) {
            throw new \ErrorException($errstr, 0, $errno, $errfile, $errline);
        }
    }
    return true;
}
$old_error_handler = set_error_handler("LampcmsErrorHandler");
// autoloader here
require 'autoload.php';
$Registry = \Lampcms\Registry::getInstance();
try {
    $oINI = $Registry->Ini;
    $dataDir = $oINI->LAMPCMS_DATA_DIR;
    $dataDir = rtrim($dataDir, '/');
    define('LAMPCMS_WWW_DIR', LAMPCMS_PATH . DIRECTORY_SEPARATOR . \Lampcms\WWW_DIR . DIRECTORY_SEPARATOR);
    define('LAMPCMS_DEVELOPER_EMAIL', $oINI->EMAIL_DEVELOPER);
    define('LAMPCMS_SALT', $oINI->SALT);
    define('LAMPCMS_COOKIE_SALT', $oINI->COOKIE_SALT);
    define('LAMPCMS_DEFAULT_LANG', $oINI->DEFAULT_LANG);
    define('LAMPCMS_DEFAULT_LOCALE', $oINI->DEFAULT_LOCALE);
    define('LAMPCMS_TR_DIR', $oINI->TRANSLATIONS_DIR);
    define('LAMPCMS_COOKIE_DOMAIN', $oINI->COOKIE_DOMAIN);
    define('LAMPCMS_IMAGE_SITE', $oINI->IMAGE_SITE);
    define('LAMPCMS_AVATAR_IMG_SITE', $oINI->AVATAR_IMG_SITE);
    if (!empty($dataDir)) {
示例#2
0
 /**
  * Internal getter of Registry object
  * We need this for when the object is unserialized
  * and thus does not have instance of Registry object anymore
  *
  * When object is instantiated the normal way
  * via constructor it has registry object.
  *
  * @return object of type Registry
  */
 public function getRegistry()
 {
     if (!isset($this->Registry)) {
         $this->Registry = Registry::getInstance();
     }
     return $this->Registry;
 }