From a926328583e7ffdaaac7daf2f87810d842423f21 Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Wed, 10 Nov 2010 15:26:43 -0600 Subject: Changing all class constructors to __construct() --- system/core/Config.php | 2 +- system/core/Exceptions.php | 3 +-- system/core/Hooks.php | 2 +- system/core/Input.php | 36 +++++++++++++++++------------------- system/core/Lang.php | 2 +- system/core/Loader.php | 2 +- system/core/Output.php | 2 +- system/core/Router.php | 2 +- system/core/URI.php | 4 ++-- system/core/Unicode.php | 2 +- 10 files changed, 27 insertions(+), 30 deletions(-) (limited to 'system/core') diff --git a/system/core/Config.php b/system/core/Config.php index b7055c6c9..bdd1b8333 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -43,7 +43,7 @@ class CI_Config { * @param boolean true if errors should just return false, false if an error message should be displayed * @return boolean if the file was successfully loaded or not */ - function CI_Config() + function __construct() { $this->config =& get_config(); log_message('debug', "Config Class Initialized"); diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php index 26b24ef17..32cb77baf 100644 --- a/system/core/Exceptions.php +++ b/system/core/Exceptions.php @@ -50,9 +50,8 @@ class CI_Exceptions { /** * Constructor - * */ - function CI_Exceptions() + public function __construct() { $this->ob_level = ob_get_level(); // Note: Do not log messages from this constructor. diff --git a/system/core/Hooks.php b/system/core/Hooks.php index 3f841943c..70dc6870b 100644 --- a/system/core/Hooks.php +++ b/system/core/Hooks.php @@ -36,7 +36,7 @@ class CI_Hooks { * Constructor * */ - function CI_Hooks() + function __construct() { $this->_initialize(); log_message('debug', "Hooks Class Initialized"); diff --git a/system/core/Input.php b/system/core/Input.php index f959b2890..0ce2d893a 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -35,16 +35,14 @@ class CI_Input { var $_enable_xss = FALSE; // Set automatically based on config setting var $_enable_csrf = FALSE; // Set automatically based on config setting - /** - * Constructor - * - * Sets whether to globally enable the XSS processing - * and whether to allow the $_GET array - * - * @access public - */ - function CI_Input() + * Constructor + * + * Sets whether to globally enable the XSS processing + * and whether to allow the $_GET array + * + */ + public function __construct() { log_message('debug', "Input Class Initialized"); @@ -72,16 +70,16 @@ class CI_Input { // -------------------------------------------------------------------- /** - * Fetch from array - * - * This is a helper function to retrieve values from global arrays - * - * @access private - * @param array - * @param string - * @param bool - * @return string - */ + * Fetch from array + * + * This is a helper function to retrieve values from global arrays + * + * @access private + * @param array + * @param string + * @param bool + * @return string + */ function _fetch_from_array(&$array, $index = '', $xss_clean = FALSE) { if ( ! isset($array[$index])) diff --git a/system/core/Lang.php b/system/core/Lang.php index a53a20215..e7867b354 100644 --- a/system/core/Lang.php +++ b/system/core/Lang.php @@ -34,7 +34,7 @@ class CI_Lang { * * @access public */ - function CI_Lang() + function __construct() { log_message('debug', "Language Class Initialized"); } diff --git a/system/core/Loader.php b/system/core/Loader.php index b64a6e6f4..5d4b25994 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -50,7 +50,7 @@ class CI_Loader { * * @access public */ - function CI_Loader() + function __construct() { $this->_ci_view_path = APPPATH.'views/'; $this->_ci_ob_level = ob_get_level(); diff --git a/system/core/Output.php b/system/core/Output.php index 2ded2837e..27a3a4bb0 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -37,7 +37,7 @@ class CI_Output { var $_zlib_oc = FALSE; var $_profiler_sections = array(); - function CI_Output() + function __construct() { $this->_zlib_oc = @ini_get('zlib.output_compression'); diff --git a/system/core/Router.php b/system/core/Router.php index 06c8d4846..9276800c3 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -41,7 +41,7 @@ class CI_Router { * * Runs the route mapping function. */ - function CI_Router() + function __construct() { $this->config =& load_class('Config', 'core'); $this->uri =& load_class('URI', 'core'); diff --git a/system/core/URI.php b/system/core/URI.php index b8d48c578..b36593bc0 100644 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -28,7 +28,7 @@ */ class CI_URI { - var $keyval = array(); + var $keyval = array(); var $uri_string; var $segments = array(); var $rsegments = array(); @@ -42,7 +42,7 @@ class CI_URI { * * @access public */ - function CI_URI() + function __construct() { $this->config =& load_class('Config', 'core'); log_message('debug', "URI Class Initialized"); diff --git a/system/core/Unicode.php b/system/core/Unicode.php index 20605eecb..ce1de3022 100644 --- a/system/core/Unicode.php +++ b/system/core/Unicode.php @@ -34,7 +34,7 @@ class CI_Unicode { * Determines if UTF-8 support is to be enabled * */ - function CI_Unicode() + function __construct() { log_message('debug', "Unicode Class Initialized"); -- cgit v1.2.3-24-g4f1b