function logTime($message)
 {
     if (false) {
         $this->timer->logTime($message);
     }
 }
Exemple #2
0
    // Set up autoloader (needed for YAML)
    function vufind_autoloader($class)
    {
        $fullClassName = str_replace('_', '/', $class) . '.php';
        require $fullClassName;
    }
    spl_autoload_register('vufind_autoloader');
}
global $timer;
if (empty($timer)) {
    $timer = new Timer(microtime(false));
}
// Retrieve values from configuration file
require_once ROOT_DIR . '/sys/ConfigArray.php';
$configArray = readConfig();
$timer->logTime("Read config");
if (isset($configArray['System']['timings'])) {
    $timer->enableTimings($configArray['System']['timings']);
}
//Start a logger
$logger = new Logger();
//Update error handling
if ($configArray['System']['debug']) {
    ini_set('display_errors', true);
    error_reporting(E_ALL & ~E_DEPRECATED);
}
date_default_timezone_set($configArray['Site']['timezone']);
$timer->logTime("bootstrap");
//Create the QR Code if it doesn't exit
$type = $_REQUEST['type'];
$id = $_REQUEST['id'];
Exemple #3
0
global $errorHandlingEnabled;
$errorHandlingEnabled = true;
$startTime = microtime(true);
require_once ROOT_DIR . '/sys/Logger.php';
require_once ROOT_DIR . '/sys/PEAR_Singleton.php';
PEAR_Singleton::init();
require_once ROOT_DIR . '/sys/ConfigArray.php';
require_once ROOT_DIR . '/sys/Utils/SwitchDatabase.php';
global $configArray;
$configArray = readConfig();
require_once ROOT_DIR . '/sys/Timer.php';
global $timer;
$timer = new Timer($startTime);
global $logger;
$logger = new Logger();
$timer->logTime("Read Config");
if ($configArray['System']['debug']) {
    ini_set('display_errors', true);
    error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
}
//Use output buffering to allow session cookies to have different values
// this can't be determined before session_start is called
ob_start();
initMemcache();
initDatabase();
requireSystemLibraries();
initLocale();
// Sets global error handler for PEAR errors
PEAR_Singleton::setErrorHandling(PEAR_ERROR_CALLBACK, 'handlePEARError');
loadLibraryAndLocation();
loadSearchInformation();
 function logTime($message)
 {
     if ($this->doTimings) {
         $this->timer->logTime($message);
     }
 }