diff options
author | Andrey Andreev <narf@devilix.net> | 2014-01-08 14:27:53 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-01-08 14:27:53 +0100 |
commit | 119d8a7547e155edaaa53682b9247cd7e80d8c9d (patch) | |
tree | cfcaa9dae3b642833d80c06b00805ba2d521c953 /system/helpers/cookie_helper.php | |
parent | cab3e1813f71bddfe8f045772e5cb42e76a4d347 (diff) |
Optimize get_instance() calls/assignments
Diffstat (limited to 'system/helpers/cookie_helper.php')
-rw-r--r-- | system/helpers/cookie_helper.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/system/helpers/cookie_helper.php b/system/helpers/cookie_helper.php index e465412cf..5cdcdd137 100644 --- a/system/helpers/cookie_helper.php +++ b/system/helpers/cookie_helper.php @@ -59,8 +59,7 @@ if ( ! function_exists('set_cookie')) function set_cookie($name, $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = FALSE, $httponly = FALSE) { // Set the config file options - $CI =& get_instance(); - $CI->input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure, $httponly); + get_instance()->input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure, $httponly); } } @@ -77,9 +76,8 @@ if ( ! function_exists('get_cookie')) */ function get_cookie($index, $xss_clean = FALSE) { - $CI =& get_instance(); $prefix = isset($_COOKIE[$index]) ? '' : config_item('cookie_prefix'); - return $CI->input->cookie($prefix.$index, $xss_clean); + return get_instance()->input->cookie($prefix.$index, $xss_clean); } } |