[Solar-talk] Making a Solar::callback() method

Rodrigo Moraes rodrigo.moraes at gmail.com
Fri Aug 3 09:21:38 CDT 2007


On 8/3/07, Pierre Oztel wrote:
>
> Yes, that is why i thought about pushing Solar_Valid, Solar_Filter in the
> registry.
>
> At least it can be passed as a property for client objects, I mean isn't
> it a waste of instanciating object like Valid or Filter ?


They don't even have a constructor, so instantiating them doesn't process
very much I think. But I see your point and one idea to make everybody happy
is to always allow the filter class to be changed. Then you can subclass it
and use the registry, a getInstance() method or something else to always
have unique instances of the filter class. This is also valid for other
classes used internally, like Solar_Sql_Select calls inside the model class:
allow custom classes to be used and the possibilities expand a lot.

The problem I see about adding registered objects is to start inflating
class configs and user's registry. I mean, every required registered object
adds a required code in the user land to setup Solar. It's nice that Solar
uses the registry only when it is really necessary for performance or
functionality - for 'sql', 'user' and 'request' (in SVN); the more you add,
the more things start to get in the way.

-- rodrigo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman-mail3.webfaction.com/pipermail/solar-talk/attachments/20070803/6684f5c7/attachment-0001.html


More information about the Solar-talk mailing list