![]() |
library class in my application - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: library class in my application (/showthread.php?tid=52829) |
library class in my application - El Forum - 06-28-2012 [eluser]andygo[/eluser] I am trying to create a library class in my application. I am experimenting with the form validation class example from the docs. I seperated soem of the code and put it in a library file. It works except for the call back function. I havent changed anything so I was wondering if there's something I'm missing in having it in a library class..... Here's the library class code: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Any help appreciated. BTW: It works fine when set up as per the docs. library class in my application - El Forum - 06-28-2012 [eluser]InsiteFX[/eluser] Place your callbacks in a MY_Controller library class in my application - El Forum - 06-29-2012 [eluser]andygo[/eluser] Thanks InsiteFX, much appreciated I created a MY_Controller in application/core and extended it in the controller. I referenced my library file and now my library has access to the callback function in the MY_Controller.. In case this helps anyone here is my code... Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |