Welcome Guest, Not a member yet? Register   Sign In
Writting support classes?
#3

[eluser]Knitter[/eluser]
I think you misunderstood me in... well everything, I do get a bit confusing when writing what comes to mind, let me try to explain.

As support classes I'm not talking about other controllers, I'm talking about... support classes, for instance, Menu class that represents a menu item in the Toolbar class, a button class that represents a button, with all it's stats and action, not a controller and not accessed by a URL.

Putting those classes in the libraries folder is strange, that's what got me confused, I don't want a library, nor a helper, I want something that is part of my base application.

I do extend Java core/base classes but to get my "middle controller" I had to extend the Controller class, give my class the name MY_Controller and put it into the libraries folder, if I didn't do that, the my controller was never found by CI, it was an invisible class.

Accessing a controller from another one was just a quick example, I don't want to have to include all the files that define my classes all over one another, I wanted on simple autoload special function to handle that, I tried to get one into CI, but I failed to achieve that, maybe my fault, but I did manage to break CI...

The existing autoload method will look only at predestined folders and will instantiate the object and it will fail because most, if not all my objects, have constructors with parameters, as the should.

Should my "middle constructor" be named just "General", extend Controller and then all my other constructors be able to extend "General" without going to the trouble of creating a library?

I have a bunch of classes, they are in the model folder, why must they extend Model? It messes up with my inheritance, as I thing PHP still lacks multiple inheritance, and forces me to join things that are not related. And if they are nor extending Model, or Controller, or any other base class CI just ignores them.

I may have failed to see, in the manual, where this issue was addressed, and if so, I'll be more than glad to read another RTFM reply, but TFM is becoming to lack in it's explanations. I can, of course, dig into the code, but isn't the point, or at least one of them, not to do that? If I start needing to read the code to learn the basics on CI, then something is not right with TFM.

Regards,

Knitter


Messages In This Thread
Writting support classes? - by El Forum - 09-29-2009, 02:42 PM
Writting support classes? - by El Forum - 10-01-2009, 08:10 AM
Writting support classes? - by El Forum - 10-01-2009, 09:01 AM
Writting support classes? - by El Forum - 10-01-2009, 09:20 AM
Writting support classes? - by El Forum - 10-01-2009, 10:02 AM
Writting support classes? - by El Forum - 10-01-2009, 10:28 AM
Writting support classes? - by El Forum - 10-01-2009, 10:36 AM
Writting support classes? - by El Forum - 10-01-2009, 10:57 AM
Writting support classes? - by El Forum - 10-01-2009, 11:00 AM
Writting support classes? - by El Forum - 10-01-2009, 01:29 PM
Writting support classes? - by El Forum - 10-01-2009, 01:54 PM
Writting support classes? - by El Forum - 10-01-2009, 02:05 PM
Writting support classes? - by El Forum - 10-01-2009, 02:21 PM
Writting support classes? - by El Forum - 10-01-2009, 02:25 PM
Writting support classes? - by El Forum - 10-01-2009, 02:29 PM
Writting support classes? - by El Forum - 10-01-2009, 03:24 PM
Writting support classes? - by El Forum - 10-01-2009, 03:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB