Changeset 267 for trunk/trax/vendor
- Timestamp:
- 10/16/06 04:06:51 (6 years ago)
- Files:
-
- 1 modified
-
trunk/trax/vendor/trax/trax.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/trax/vendor/trax/trax.php
r251 r267 37 37 public static 38 38 $models_path = null, 39 $views_path = null, 40 $controllers_path = null, 41 $helpers_path = null, 42 $layouts_path = null, 43 $config_path = null, 44 $environments_path = null, 45 $lib_path = null, 46 $app_path = null, 47 $log_path = null, 39 $views_path = null, 40 $controllers_path = null, 41 $helpers_path = null, 42 $layouts_path = null, 43 $config_path = null, 44 $environments_path = null, 45 $lib_path = null, 46 $app_path = null, 47 $log_path = null, 48 48 $vendor_path = null, 49 49 $public_path = null, … … 55 55 $current_action_name = null, 56 56 $current_controller_object = null; 57 58 57 59 58 function initialize() { 60 59 61 60 if(substr(PHP_OS, 0, 3) == 'WIN') { 62 61 # Windows 63 62 self::$path_seperator = ";"; 64 } 65 66 # Set include paths 63 } 64 65 # Set include paths 67 66 self::$models_path = TRAX_ROOT."/app/models"; 68 67 self::$views_path = TRAX_ROOT."/app/views"; … … 77 76 self::$vendor_path = TRAX_ROOT."/vendor"; 78 77 self::$public_path = TRAX_ROOT."/public"; 79 78 80 79 # Set which file to log php errors to for this application 81 80 # As well in your application you can do error_log("whatever") and it will go to this log file. 82 81 ini_set("log_errors", "On"); 83 ini_set("error_log", self::$log_path."/".TRAX_ENV.".log"); 84 82 ini_set("error_log", self::$log_path."/".TRAX_ENV.".log"); 83 85 84 if(TRAX_ENV == "development") { 86 85 # Display errors to browser if in development mode for debugging … … 90 89 ini_set("display_errors", "Off"); 91 90 } 92 91 93 92 # Set the include_path 94 93 ini_set("include_path", 95 ".".self::$path_seperator. # current directory 96 TRAX_LIB_ROOT.self::$path_seperator. # trax libs (vendor/trax or server trax libs) 97 PHP_LIB_ROOT.self::$path_seperator. # php libs dir (ex: /usr/local/lib/php) 98 TRAX_ROOT.self::$lib_path.self::$path_seperator. # app specific libs extra libs to include 99 ini_get("include_path")); # add on old include_path to end 100 94 ".".self::$path_seperator. # current directory 95 TRAX_LIB_ROOT.self::$path_seperator. # trax libs (vendor/trax or server trax libs) 96 PHP_LIB_ROOT.self::$path_seperator. # php libs dir (ex: /usr/local/lib/php) 97 self::$lib_path.self::$path_seperator. # app specific libs extra libs to include 98 ini_get("include_path") # tack on the old include_path to the end 99 ); # add on old include_path to end 100 101 101 # Include Trax library files. 102 102 include_once("session.php"); … … 117 117 ActiveRecord::$database_settings = parse_ini_file(self::$config_path."/database.ini", true); 118 118 } 119 119 120 120 } 121 121 122 122 function include_env_config() { 123 123 # Include the application environment specific config file 124 124 if(file_exists(self::$environments_path."/".TRAX_ENV.".php")) { 125 125 include_once(self::$environments_path."/".TRAX_ENV.".php"); 126 } 126 } 127 127 } 128 128 }
