Welcome Guest, Not a member yet? Register   Sign In
How to instantiate classes?
#3

[eluser]sl3dg3hamm3r[/eluser]
Thank you for your reply.

Let me ask about common practise. I'd like to use the controllers only as helpers which will decide what class needs to be loaded, eventually also checking form-data first, according to the Front-Controller
These classes contain business-logic. Managing products, defining relations and rules etc.
Now, would you expect such classes rather in the controller-folder, or should I stick them into libraries?

I didn't find any documentation about load_class - how can I pass parameters to the constructor?

Oliver

P.S.: Just figured out that CI expect it in libraries - my first question is obsolete
P.P.S.: load_class() acts as singleton?? and what do I need to do if I want several instances?


Messages In This Thread
How to instantiate classes? - by El Forum - 10-10-2008, 11:20 AM
How to instantiate classes? - by El Forum - 10-10-2008, 11:39 AM
How to instantiate classes? - by El Forum - 10-10-2008, 12:59 PM
How to instantiate classes? - by El Forum - 10-10-2008, 01:25 PM
How to instantiate classes? - by El Forum - 10-10-2008, 01:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB