New to code igniter having a hard time with instantiating classes |
[eluser]danmontgomery[/eluser]
[quote author="Bart v B" date="1312863341"]ZIPPP... Wrong answer.. Your writing a helper.. Code: <?php No... Code: function __construct() There's no reason to access the CI object indirectly from a model except when trying to load another model. Also, database is loaded directly, not through library(). More to the point, helpers aren't classes, they are a collection of functions. If you are trying to include your own class that isn't a model, it should be a library, and you should be using it like any other. Code: $this->load->library('catalog'); http://ellislab.com/codeigniter/user-gui...lpers.html http://ellislab.com/codeigniter/user-gui...aries.html |
Messages In This Thread |
New to code igniter having a hard time with instantiating classes - by El Forum - 08-08-2011, 11:33 AM
New to code igniter having a hard time with instantiating classes - by El Forum - 08-08-2011, 11:43 AM
New to code igniter having a hard time with instantiating classes - by El Forum - 08-08-2011, 11:50 AM
New to code igniter having a hard time with instantiating classes - by El Forum - 08-08-2011, 05:15 PM
New to code igniter having a hard time with instantiating classes - by El Forum - 08-09-2011, 08:11 AM
|