summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/general/creating_libraries.rst
diff options
context:
space:
mode:
authorJoel Kallman <jkallman@eclarian.com>2012-03-12 23:10:44 +0100
committerJoel Kallman <jkallman@eclarian.com>2012-03-12 23:10:44 +0100
commit7c4870c3741e165bc7bc06624c816e66db474ee2 (patch)
treea96962212cb012be32ab09545dcd5c4dbdac05e2 /user_guide_src/source/general/creating_libraries.rst
parent10aa8e660c6f439958b79fce5d85ce7e8eecf028 (diff)
parent6b535f51fcb94e0a645fda0d0356f4748076877e (diff)
Merge branch 'develop' into feature/db_toString_support
Diffstat (limited to 'user_guide_src/source/general/creating_libraries.rst')
-rw-r--r--user_guide_src/source/general/creating_libraries.rst16
1 files changed, 11 insertions, 5 deletions
diff --git a/user_guide_src/source/general/creating_libraries.rst b/user_guide_src/source/general/creating_libraries.rst
index bc545b483..673fbd4bb 100644
--- a/user_guide_src/source/general/creating_libraries.rst
+++ b/user_guide_src/source/general/creating_libraries.rst
@@ -188,17 +188,23 @@ application/libraries/MY_Email.php, and declare your class with::
}
-Note: If you need to use a constructor in your class make sure you
+If you need to use a constructor in your class make sure you
extend the parent constructor::
class MY_Email extends CI_Email {
- public function __construct()
- {
- parent::__construct();
- }
+ public function __construct($config = array())
+ {
+ parent::__construct($config);
+ }
+
}
+.. note::
+ Not all of the libraries have the same (or any) parameters
+ in their constructor. Take a look at the library that you're
+ extending first to see how it should be implemented.
+
Loading Your Sub-class
----------------------