[eluser]vlad_ci[/eluser]
@m4rw3r - thank you, get_instance indeed returns my Controller, not a base
class as I thought previously. And it does exactly what I need.
@sophistry -- a class for every function because I am thinking
(and I am just a one month old as far as PHP/Javascrip/Ajax/codeigniter/
web development is concerned (I am from C++/Boost/STL/threading world)
a) I would prefer a 'delayed' instanciation of the machinery I need
to serve different requests.
For example: most of my PHP
requests will be to send out JSON back for my Ajax/dojo client.
And the data for the requests will be coming from more than one database,
memcache, and possibly another webserver (since I cannot do crossdomain
ajax calls while within https)
So I do not want to unnecessarely instanciate variables/classes/etc
all the time only if I need some functionality for a particular request.
b) I did not feel comfortable with model/view/controller to
'modularize my code' because I cannot decide early enough what
functions I will need for each controller and what data I will need for each.
And the M/V/C prohibits easy way to call functions of one class instance
from another (especially it prohibits making your classes to inherit
from PHP's Spl datastructure classes -- that I use to organize my iterative and recursive/logic)
Therefore right now I feel much more comfortable using CI's
'library' and 'helpers' to modularize my code -- because those are
very un-assuming about who will invoke them and why, and that's how
I like it.