summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/general
diff options
context:
space:
mode:
authorJamie Rumbelow <jamie@jamierumbelow.net>2012-03-08 13:53:36 +0100
committerJamie Rumbelow <jamie@jamierumbelow.net>2012-03-08 13:53:36 +0100
commite311a99e127de3c9b86824127683c85cec2248b7 (patch)
treedeb8e1ac3a207de360801a96bc2a0f5436824c0a /user_guide_src/source/general
parent0cd8c798de4b99b5ad41bacdeef77a4a7b815a03 (diff)
parent5d27c43d29fc049497010ea62ac7877a64bfed92 (diff)
Merge branch 'develop' of git://github.com/EllisLab/CodeIgniter into develop
Diffstat (limited to 'user_guide_src/source/general')
-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
----------------------