From e334c472fb4be44feec3a73402fc4a2b062cbfc0 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 21 Oct 2006 19:44:22 +0000 Subject: --- system/codeigniter/Base4.php | 20 ++++++++++---------- system/codeigniter/Base5.php | 34 +++++++++++++++++----------------- system/codeigniter/CodeIgniter.php | 34 +++++++++++++++++----------------- system/codeigniter/Common.php | 26 +++++++++++++------------- 4 files changed, 57 insertions(+), 57 deletions(-) (limited to 'system/codeigniter') diff --git a/system/codeigniter/Base4.php b/system/codeigniter/Base4.php index 2793317e7..b2713b660 100644 --- a/system/codeigniter/Base4.php +++ b/system/codeigniter/Base4.php @@ -7,31 +7,31 @@ * @package CodeIgniter * @author Rick Ellis * @copyright Copyright (c) 2006, pMachine, Inc. - * @license http://www.codeignitor.com/user_guide/license.html + * @license http://www.codeignitor.com/user_guide/license.html * @link http://www.codeigniter.com * @since Version 1.3 * @filesource */ - + // ------------------------------------------------------------------------ /** * CI_BASE - For PHP 4 - * + * * This file is used only when Code Igniter is being run under PHP 4. - * - * In order to allow CI to work under PHP 4 we had to make the Loader class + * + * In order to allow CI to work under PHP 4 we had to make the Loader class * the parent of the Controller Base class. It's the only way we can - * enable functions like $this->load->library('email') to instantiate + * enable functions like $this->load->library('email') to instantiate * classes that can then be used within controllers as $this->email->send() * - * PHP 4 also has trouble referencing the CI super object within application + * PHP 4 also has trouble referencing the CI super object within application * constructors since objects do not exist until the class is fully * instantiated. Basically PHP 4 sucks... * - * Since PHP 5 doesn't suffer from this problem so we load one of + * Since PHP 5 doesn't suffer from this problem so we load one of * two files based on the version of PHP being run. - * + * * @package CodeIgniter * @subpackage codeigniter * @category front-controller @@ -56,7 +56,7 @@ function &get_instance() { global $CI, $OBJ; - if (is_object($CI)) + if (is_object($CI)) { return $CI; } diff --git a/system/codeigniter/Base5.php b/system/codeigniter/Base5.php index e37c257af..0d036fae2 100644 --- a/system/codeigniter/Base5.php +++ b/system/codeigniter/Base5.php @@ -7,22 +7,22 @@ * @package CodeIgniter * @author Rick Ellis * @copyright Copyright (c) 2006, pMachine, Inc. - * @license http://www.codeignitor.com/user_guide/license.html + * @license http://www.codeignitor.com/user_guide/license.html * @link http://www.codeigniter.com * @since Version 1.3 * @filesource */ - - + + // ------------------------------------------------------------------------ /** * CI_BASE - For PHP 5 - * + * * This file contains some code used only when Code Igniter is being * run under PHP 5. It allows us to manage the CI super object more * gracefully than what is possible with PHP 4. - * + * * @package CodeIgniter * @subpackage codeigniter * @category front-controller @@ -32,22 +32,22 @@ class CI_Base { - private static $instance; - - public function CI_Base() - { - self::$instance =& $this; - } - - public static function &get_instance() - { - return self::$instance; - } + private static $instance; + + public function CI_Base() + { + self::$instance =& $this; + } + + public static function &get_instance() + { + return self::$instance; + } } function &get_instance() { - return CI_Base::get_instance(); + return CI_Base::get_instance(); } diff --git a/system/codeigniter/CodeIgniter.php b/system/codeigniter/CodeIgniter.php index 409cf7765..fb27191ce 100644 --- a/system/codeigniter/CodeIgniter.php +++ b/system/codeigniter/CodeIgniter.php @@ -7,26 +7,26 @@ * @package CodeIgniter * @author Rick Ellis * @copyright Copyright (c) 2006, pMachine, Inc. - * @license http://www.codeignitor.com/user_guide/license.html + * @license http://www.codeignitor.com/user_guide/license.html * @link http://www.codeigniter.com * @since Version 1.0 * @filesource */ - + // ------------------------------------------------------------------------ /** * System Front Controller * - * Loads the base classes and executes the request. - * + * Loads the base classes and executes the request. + * * @package CodeIgniter * @subpackage codeigniter * @category Front-controller * @author Rick Ellis * @link http://www.codeigniter.com/user_guide/ */ - + define('APPVER', '1.5.0'); /* @@ -84,7 +84,7 @@ $OUT =& load_class('Output'); * Is there a valid cache file? If so, we're done... * ------------------------------------------------------ */ - + if ($EXT->_call_hook('cache_override') === FALSE) { if ($OUT->_display_cache($CFG, $RTR) == TRUE) @@ -107,17 +107,17 @@ $LANG =& load_class('Language'); * ------------------------------------------------------ * Load the app controller and local controller * ------------------------------------------------------ - * + * * Note: Due to the poor object handling in PHP 4 we'll * conditionally load different versions of the base * class. Retaining PHP 4 compatibility requires a bit of a hack. * * Note: The Loader class needs to be included first - * + * */ - -load_class('Loader', FALSE); - + +load_class('Loader', FALSE); + if (floor(phpversion()) < 5) { require(BASEPATH.'codeigniter/Base4'.EXT); @@ -127,7 +127,7 @@ else require(BASEPATH.'codeigniter/Base5'.EXT); } -load_class('Controller', FALSE); +load_class('Controller', FALSE); require(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().EXT); @@ -139,9 +139,9 @@ $BM->mark('loading_time_base_classes_end'); * ------------------------------------------------------ * Security check * ------------------------------------------------------ - * + * * None of the functions in the app controller or the - * loader class can be called via the URI, nor can + * loader class can be called via the URI, nor can * controller functions that begin with an underscore */ $class = $RTR->fetch_class(); @@ -150,7 +150,7 @@ $method = $RTR->fetch_method(); if ( ! class_exists($class) OR $method == 'controller' - OR substr($method, 0, 1) == '_' + OR substr($method, 0, 1) == '_' OR in_array($method, get_class_methods('Controller'), TRUE) ) { @@ -205,7 +205,7 @@ else show_404(); } - // Call the requested method. + // Call the requested method. // Any URI segments present (besides the class/function) will be passed to the method for convenience call_user_func_array(array(&$CI, $method), array_slice($RTR->rsegments, (($RTR->fetch_directory() == '') ? 2 : 3))); } @@ -226,7 +226,7 @@ $EXT->_call_hook('post_controller'); * Send the final rendered output to the browser * ------------------------------------------------------ */ - + if ($EXT->_call_hook('display_override') === FALSE) { $OUT->_display(); diff --git a/system/codeigniter/Common.php b/system/codeigniter/Common.php index a82d486e6..c8078bf65 100644 --- a/system/codeigniter/Common.php +++ b/system/codeigniter/Common.php @@ -7,26 +7,26 @@ * @package CodeIgniter * @author Rick Ellis * @copyright Copyright (c) 2006, pMachine, Inc. - * @license http://www.codeignitor.com/user_guide/license.html + * @license http://www.codeignitor.com/user_guide/license.html * @link http://www.codeigniter.com * @since Version 1.0 * @filesource */ - + // ------------------------------------------------------------------------ /** * Common Functions * - * Loads the base classes and executes the request. - * + * Loads the base classes and executes the request. + * * @package CodeIgniter * @subpackage codeigniter * @category Common Functions * @author Rick Ellis * @link http://www.codeigniter.com/user_guide/ */ - + // ------------------------------------------------------------------------ /** @@ -35,7 +35,7 @@ * This function acts as a singleton. If the requested class does not * exist it is instantiated and set to a static variable. If it has * previously been instantiated the variable is returned. -* +* * @access public * @param string the class name being requested * @param bool optional flag that lets classes get loaded but not instantiated @@ -150,9 +150,9 @@ function &config_item($item) * Error Handler * * This function lets us invoke the exception class and -* display errors using the standard error template located +* display errors using the standard error template located * in application/errors/errors.php -* This function will send the error page directly to the +* This function will send the error page directly to the * browser and exit. * * @access public @@ -185,7 +185,7 @@ function show_404($page = '') /** -* Error Logging Interface +* Error Logging Interface * * We use this as a simple mechanism to access the logging * class and send messages to be logged. @@ -212,8 +212,8 @@ function log_message($level = 'error', $message, $php_error = FALSE) * Exception Handler * * This is the custom exception handler we defined at the -* top of this file. The main reason we use this is permit -* PHP errors to be logged in our own log files since we may +* top of this file. The main reason we use this is permit +* PHP errors to be logged in our own log files since we may * not have access to server logs. Since this function * effectively intercepts PHP errors, however, we also need * to display errors based on the current error_reporting level. @@ -230,7 +230,7 @@ function _exception_handler($severity, $message, $filepath, $line) // use version 4 style class functions (without prefixes // like "public", "private", etc.) you'll get notices telling // you that these have been deprecated. - + if ($severity == E_STRICT) { return; @@ -238,7 +238,7 @@ function _exception_handler($severity, $message, $filepath, $line) $error =& load_class('Exceptions'); - // Should we display the error? + // Should we display the error? // We'll get the current error_reporting level and add its bits // with the severity bits to find out. -- cgit v1.2.3-24-g4f1b