Permalink
Browse files

get_instance() consistency w/o comments

Signed-off-by: dchill42 <dchill42@gmail.com>
  • Loading branch information...
1 parent f09f66e commit 69870e30aade57cd38fb7356ec868c5a9c06b939 @dchill42 committed Oct 2, 2012
View
@@ -79,7 +79,7 @@ class CI_Config {
public function __construct()
{
// Take over core config
- $CI = get_instance(); // Use get_instance() for unit test override
+ $CI = get_instance();
$this->config = $CI->_core_config;
unset($CI->_core_config);
@@ -52,7 +52,7 @@ class CI_Controller {
*/
public function __construct()
{
- $this->CI = get_instance(); // Use get_instance() for unit test override
+ $this->CI = get_instance();
log_message('debug', 'Controller Class Initialized');
}
@@ -209,7 +209,7 @@ protected function _route_error($route, $template, $args = NULL)
}
// Check Router for an override
- $CI =& get_instance(); // Use get_instance() for unit test override
+ $CI =& get_instance();
if (isset($CI->router))
{
$stack = $CI->router->get_error_route($route);
View
@@ -66,7 +66,7 @@ class CI_Hooks {
*/
public function __construct()
{
- $CI =& get_instance(); // Use get_instance() for unit test override
+ $CI =& get_instance();
log_message('debug', 'Hooks Class Initialized');
View
@@ -101,7 +101,7 @@ public function __construct()
{
log_message('debug', 'Input Class Initialized');
- $CI =& get_instance(); // Use get_instance() for unit test override
+ $CI =& get_instance();
$this->security =& $CI->security;
$this->_allow_get_array = ($CI->config->item('allow_get_array') === TRUE);
View
@@ -85,7 +85,7 @@ public function load($langfile, $idiom = '', $return = FALSE, $add_suffix = TRUE
if ($idiom === '')
{
- $CI = get_instance(); // Use get_instance() for unit test override
+ $CI = get_instance();
$cfg_lang = $CI->config->item('language');
$idiom = ( ! empty($cfg_lang)) ? $cfg_lang : 'english';
}
View
@@ -158,7 +158,7 @@ class CI_Loader {
public function __construct()
{
// Attach parent reference
- $this->CI =& get_instance(); // Use get_instance() for unit test override
+ $this->CI =& get_instance();
// Get initial buffering level
$this->_ci_ob_level = ob_get_level();
View
@@ -119,7 +119,7 @@ class CI_Output {
public function __construct()
{
// Get parent reference
- $this->CI =& get_instance(); // Use get_instance() for unit test override
+ $this->CI =& get_instance();
$this->_zlib_oc = (bool) @ini_get('zlib.output_compression');
View
@@ -84,7 +84,7 @@ class CI_Router {
*/
public function __construct()
{
- $this->CI =& get_instance(); // Use get_instance() for unit test override
+ $this->CI =& get_instance();
$this->route_stack = array('', '', '', '');
log_message('debug', 'Router Class Initialized');
}
View
@@ -111,7 +111,7 @@ class CI_Security {
public function __construct()
{
// Is CSRF protection enabled?
- $CI = get_instance(); // Use get_instance() for unit test override
+ $CI = get_instance();
if ($CI->config->item('csrf_protection') === TRUE)
{
// CSRF config
@@ -152,7 +152,7 @@ public function csrf_verify()
}
// Check if URI has been whitelisted from CSRF checks
- $CI = get_instance(); // Use get_instance() for unit test override
+ $CI = get_instance();
if ($exclude_uris = $CI->config->item('csrf_exclude_uris'))
{
if (in_array($CI->uri->uri_string(), $exclude_uris))
@@ -196,7 +196,7 @@ public function csrf_verify()
*/
public function csrf_set_cookie()
{
- $CI = get_instance(); // Use get_instance() for unit test override
+ $CI = get_instance();
$expire = time() + $this->_csrf_expire;
$secure_cookie = (bool) $CI->config->item('cookie_secure');
View
@@ -78,7 +78,7 @@ class CI_URI {
*/
public function __construct()
{
- $this->config = get_instance()->config; // Use get_instance() for unit test override
+ $this->config = get_instance()->config;
log_message('debug', 'URI Class Initialized');
}
View
@@ -49,7 +49,7 @@ public function __construct()
{
log_message('debug', 'Utf8 Class Initialized');
- $CI =& get_instance(); // Use get_instance() for unit test override
+ $CI =& get_instance();
if (
@preg_match('/./u', 'é') === 1 // PCRE must support UTF-8
@@ -96,7 +96,7 @@ public function load_driver($child)
if ( ! class_exists($child_class))
{
// check application path first
- $CI =& CodeIgniter::instance();
+ $CI =& get_instance();
foreach ($CI->load->get_package_paths(TRUE) as $path)
{
// loves me some nesting!

0 comments on commit 69870e3

Please sign in to comment.