• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple Classes inside a library

#2
[eluser]Rolly1971[/eluser]
if it was me i would separate each class into it's own file. You could even drop these class files into a sub directory in the libraries folder. DOn't forget though that in order to load the lib's you would need to get the CI instance:

Code:
class someclass{
private $ci;

function __construct()
{
$this->ci =& get_instance();
}

then to load your libraries you would use:

Code:
$this->ci->load->library('subfolder/classname');


Messages In This Thread
Multiple Classes inside a library - by El Forum - 10-04-2012, 07:56 AM
Multiple Classes inside a library - by El Forum - 10-04-2012, 08:03 AM
Multiple Classes inside a library - by El Forum - 10-04-2012, 08:16 AM
Multiple Classes inside a library - by El Forum - 10-04-2012, 08:23 AM
Multiple Classes inside a library - by El Forum - 10-04-2012, 08:54 AM
Multiple Classes inside a library - by El Forum - 10-04-2012, 03:59 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.