From e0df07950b101316c07ccec882ae00f930bca0c6 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Fri, 22 Jul 2011 16:11:34 -0600 Subject: Fixed conflict in changelog. --- system/core/Loader.php | 15 +++++++++++++++ user_guide/changelog.html | 2 ++ user_guide/libraries/loader.html | 6 ++++++ 3 files changed, 23 insertions(+) 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 * diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 95270febc..81307fe0b 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -86,6 +86,8 @@ Change Log
  • Altered Session to use a longer match against the user_agent string. See upgrade notes if using database sessions.
  • Added is_unique to the Form Validation library.
  • Added $this->db->set_dbprefix() to the Database Driver.
  • +
  • Changed $this->cart->insert() in the Cart Library to return the Row ID if a single item was inserted successfully.
  • +
  • Added $this->load->get_var() to the Loader library to retrieve global vars set with $this->load->view() and $this->load->vars().
  • diff --git a/user_guide/libraries/loader.html b/user_guide/libraries/loader.html index 1d93af5ed..a472730ca 100644 --- a/user_guide/libraries/loader.html +++ b/user_guide/libraries/loader.html @@ -175,6 +175,12 @@ and merged into one array for conversion to variables.

    +

    $this->load->get_var($key)

    + +

    This function checks the associative array of variables available to your views. This is useful if for any reason a var is set in a library or another controller method using $this->load->vars(). +

    + +

    $this->load->helper('file_name')

    This function loads helper files, where file_name is the name of the file, without the _helper.php extension.

    -- cgit v1.2.3-24-g4f1b