function initialize() { self::register_autoload(); self::$version = self::version(); if (substr(PHP_OS, 0, 3) == 'WIN') { # Windows self::$path_seperator = ";"; } # Set include paths self::$models_path = TRAX_ROOT . "/app/models"; self::$views_path = TRAX_ROOT . "/app/views"; self::$controllers_path = TRAX_ROOT . "/app/controllers"; self::$helpers_path = TRAX_ROOT . "/app/helpers"; self::$layouts_path = TRAX_ROOT . "/app/views/layouts"; self::$assets_path = TRAX_ROOT . "/app/assets"; self::$config_path = TRAX_ROOT . "/config"; self::$environments_path = TRAX_ROOT . "/config/environments"; self::$lib_path = TRAX_ROOT . "/lib"; self::$app_path = TRAX_ROOT . "/app"; self::$log_path = TRAX_ROOT . "/log"; self::$vendor_path = TRAX_ROOT . "/vendor"; self::$plugins_path = TRAX_ROOT . "/vendor/plugins"; self::$public_path = TRAX_ROOT . "/public"; self::$tmp_path = TRAX_ROOT . "/tmp"; # Set which file to log php errors to for this application # As well in your application you can do error_log("whatever") and it will go to this log file. ini_set("log_errors", "On"); ini_set("error_log", self::$log_path . "/" . TRAX_ENV . ".log"); if (TRAX_ENV == "development") { # Display errors to browser if in development mode for debugging ini_set("display_errors", "On"); } else { # Hide errors from browser if not in development mode ini_set("display_errors", "Off"); } # Get the include_path so we know what the original path was self::$server_default_include_path = ini_get("include_path"); # Set the include_paths self::set_default_include_paths(); # Include Trax library files. include_once TRAX_LIB_ROOT . "/session.php"; include_once TRAX_LIB_ROOT . "/input_filter.php"; include_once TRAX_LIB_ROOT . "/trax_exceptions.php"; include_once TRAX_LIB_ROOT . "/inflector.php"; include_once TRAX_LIB_ROOT . "/active_record.php"; include_once TRAX_LIB_ROOT . "/action_controller.php"; include_once TRAX_LIB_ROOT . "/action_view.php"; include_once TRAX_LIB_ROOT . "/action_mailer.php"; include_once TRAX_LIB_ROOT . "/dispatcher.php"; include_once TRAX_LIB_ROOT . "/router.php"; self::load_active_record_connections_config(); ViewHandlers::register_extension('html'); # legancy phtml extension ViewHandlers::register_extension('phtml'); }