<?php
/**
* CyCle IDE, base
*
* @author Leon Pegg
* @package CyCleIDE
*/
# Note : all constants should be UPPERCASE and words seperated with _
# Note : all classes should be CamelCaps no _
# Note : methods and class propertys should all have modifyers (public/private/protected)
# Note : static modifyer must precede method and property modifyers (public/private/protected)
# Note : all variables should be lowercase no _
# Note : all methods/functions should be lowercase and words seperated with _
# Note : { should not be on new line
// redefine DIRECTORY_SEPARATOR because I am lazy
define('DS', DIRECTORY_SEPARATOR);
// define directory paths
define('IDE_ROOT_DIR', realpath(dirname(__FILE__)));
define('IDE_CONFIGURE_DIR', IDE_ROOT_DIR.DS.'conf');
define('IDE_IMAGE_DIR', IDE_ROOT_DIR.DS.'img');
define('IDE_LOCALE_DIR', IDE_ROOT_DIR.DS.'locale');
define('IDE_LIBRARY_DIR', IDE_ROOT_DIR.DS.'lib');
class Ide {
const ROOT_DIR = IDE_ROOT;
const CONFIGURE_DIR = IDE_CONFIGURE;
const IMAME_DIR = IDE_IMAGE;
const LOCALE_DIR = IDE_LOCALE;
const LIBRARY_DIR = IDE_LIBRARY;
protected function __construct() {
// static
}
}
set_include_path('.;'.IDE_LIBRARY_DIR.';');
require_once('ini.php');
$settings = Ini::get_instance();
$debug = $settings->get_value('cycle', 'debug');
define('DEBUG', $debug);
$timezone = $settings->get_value('cycle', 'timezone');
date_default_timezone_set($timezone);
set_exception_handler('exception_handler');
set_error_handler('error_handler');
require_once('gettext.php');
require_once('splash.php');
$splash = new Splash();
$splash->run();
$splash->destroy();
$start = new Start();
$start->show_all();
Gtk::main();
function exception_handler($exception) {
// exception handler
if (DEBUG) {
} else {
}
}
function error_handler($errno, $errstring, $errfile, $errline) {
// error handler
if (DEBUG) {
} else {
}
}
?>