From 6262d053db57957c4445ef7fce76070854c3e30d Mon Sep 17 00:00:00 2001 From: dchill42 Date: Sat, 24 Nov 2012 18:41:13 -0500 Subject: Added support for extending individual driver classes and driver unit tests Signed-off-by: dchill42 --- user_guide_src/source/changelog.rst | 3 +-- user_guide_src/source/installation/upgrade_300.rst | 16 ++++++++++++---- user_guide_src/source/libraries/sessions.rst | 5 ----- 3 files changed, 13 insertions(+), 11 deletions(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a20cd10f2..252ef926f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -274,7 +274,6 @@ Release Date: Not Released - Added method ``get_vars()`` to the Loader to retrieve all variables loaded with ``$this->load->vars()``. - ``_ci_autoloader()`` is now a protected method. - Added autoloading of drivers with ``$autoload['drivers']``. - - ``library()`` method will now load drivers as well, for backward compatibility of converted libraries (like :doc:`Session `). - ``$config['rewrite_short_tags']`` now has no effect when using PHP 5.4 as ``` changes include: @@ -2672,4 +2671,4 @@ Version Beta 1.0 Release Date: February 28, 2006 -First publicly released version. +First publicly released version. \ No newline at end of file diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 0af21b11e..ef5fbdf71 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -42,9 +42,13 @@ or extensions to work, you need to move them to **application/core/**:: application/libraries/Log.php -> application/core/Log.php application/libraries/MY_Log.php -> application/core/MY_log.php -************************************************************** -Step 5: Add new session driver items to your config/config.php -************************************************************** +********************************************************* +Step 5: Convert your Session usage from library to driver +********************************************************* + +When you load (or autoload) the Session library, you must now load it as a driver instead of a library. This means +calling ``$this->load->driver('session')`` instead of ``$this->load->library('session')`` and/or listing 'session' +in ``$autoload['drivers']`` instead of ``$autoload['libraries']``. With the change from a single Session Library to the new Session Driver, two new config items have been added: @@ -58,6 +62,10 @@ As the new Session Driver library loads the classic Cookie driver by default and available as valid drivers, neither of these configuration items are required. However, it is recommended that you add them for clarity and ease of configuration in the future. +If you have written a Session extension, you must move it into a 'Session' sub-directory of 'libraries', following the +standard for Drivers. Also beware that some functions which are not part of the external Session API have moved into +the drivers, so your extension may have to be broken down into separate library and driver class extensions. + *************************************** Step 6: Update your config/database.php *************************************** @@ -314,4 +322,4 @@ You should now put AFTER clause field names in the field definition array instea sooner rather than later. .. note:: This is for MySQL and CUBRID databases only! Other drivers don't support this - clause and will silently ignore it. + clause and will silently ignore it. \ No newline at end of file diff --git a/user_guide_src/source/libraries/sessions.rst b/user_guide_src/source/libraries/sessions.rst index ee7fb0b1c..df1049f82 100644 --- a/user_guide_src/source/libraries/sessions.rst +++ b/user_guide_src/source/libraries/sessions.rst @@ -28,10 +28,6 @@ use the $this->load->driver function:: Once loaded, the Sessions library object will be available using: $this->session -.. note:: For backward compatibility, the Session class may stil be loaded - using the $this->load->library function, but converting your applications - to use $this->load->driver is strongly recommended. - How do Sessions work? ===================== @@ -485,4 +481,3 @@ without making it the initially loaded driver, set 'sess_valid_drivers' in your config.php file to an array including your driver name:: $config['sess_valid_drivers'] = array('sess_driver'); - -- cgit v1.2.3-24-g4f1b