Welcome Guest, Not a member yet? Register   Sign In
Adding simple class
#9

[eluser]nocash[/eluser]
So, despite all that lovely code I posted above, I think I found an easier way to do this. Take your pick.

Basically, just throw your class into a library file and load it like you would normally, ie:

Code:
<?php $this->load->library('someclass'); ?>

Then you can simply...

Code:
<?php $foo = new Someclass(); ?>

I only just started doing it that way, but haven't had any problems so far. It's pretty similar to the piggyback method, but a bit cleaner.


Messages In This Thread
Adding simple class - by El Forum - 01-28-2008, 11:17 AM
Adding simple class - by El Forum - 01-28-2008, 12:55 PM
Adding simple class - by El Forum - 01-28-2008, 01:19 PM
Adding simple class - by El Forum - 01-28-2008, 01:22 PM
Adding simple class - by El Forum - 01-28-2008, 05:16 PM
Adding simple class - by El Forum - 01-28-2008, 06:40 PM
Adding simple class - by El Forum - 01-28-2008, 07:00 PM
Adding simple class - by El Forum - 02-05-2008, 09:04 PM
Adding simple class - by El Forum - 02-11-2008, 12:42 AM
Adding simple class - by El Forum - 02-11-2008, 02:10 AM
Adding simple class - by El Forum - 02-11-2008, 05:06 AM
Adding simple class - by El Forum - 04-13-2008, 11:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB