From 8731f641de823fcdcb8b2a2fa6034fca8fe4a164 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Fri, 22 Jul 2011 16:11:34 -0600 Subject: Added ->load->get_var() to check against ->load->_ci_cached_vars[]. --- system/core/Loader.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'system') diff --git a/system/core/Loader.php b/system/core/Loader.php index 721c196cc..7c8b298ac 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -388,6 +388,21 @@ class CI_Loader { // -------------------------------------------------------------------- + /** + * Get Variable + * + * Check if a variable is set and retrieve it. + * + * @param array + * @return void + */ + public function get_var($key) + { + return isset($this->_ci_cached_vars[$key]) ? $this->_ci_cached_vars[$key] : NULL; + } + + // -------------------------------------------------------------------- + /** * Load Helper * -- cgit v1.2.3-24-g4f1b