summaryrefslogtreecommitdiffstats
path: root/user_guide_src
diff options
context:
space:
mode:
authorMike Funk <mfunk@xulonpress.com>2012-03-07 19:34:13 +0100
committerMike Funk <mfunk@xulonpress.com>2012-03-07 19:34:13 +0100
commitdb70d047a6ac256eb336a2b04385aa010d6cbf42 (patch)
tree40dd24b5c4dd70fde9775e5393ed37a538c2db10 /user_guide_src
parent8f7db7bf06ab3014f80fdb730df13b57d87c2196 (diff)
parent1d571971be8be78a92d31aad27dda4009770043f (diff)
Merge branch 'develop' of https://github.com/EllisLab/CodeIgniter into feature/all_flashdata
Diffstat (limited to 'user_guide_src')
-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
----------------------