Welcome Guest, Not a member yet? Register   Sign In
loading a helper in a library
#2

[eluser]BrianDHall[/eluser]
Code:
library class...
{
   private $ci;

   function __construct()
   {
       $this->ci =& get_instance();
      
       if (! function_exists(form_open))
       {
           $this-ci->load->helper('form');
       }
   }
}

This should allow your DateForm library to be independent, and will load the form helper on its own if it isn't already loaded.


Messages In This Thread
loading a helper in a library - by El Forum - 10-10-2009, 09:40 PM
loading a helper in a library - by El Forum - 10-10-2009, 09:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB