Closed Loksly closed 10 years ago
cool. I think a plugin is good, rewriting the call method will go against what POG was originally designed for, and make it closer to what Cake or Rails do.
Are you thinking that your GetByPlugin could also do things like
GetByAttribute1And|OrAttribute2...AttributeN(val1, val2, ... valN)
If so, that would which would make it just as flexible as GetList but make it more verbose. That would be a pretty awesome plugin I think!
As for the eval, I'm not too sure right now why it was done this way. I'll have to look into it
Hi Joel,
I'm going to develop a "GetBy" plugin so you can use code like these:
which should equivalent to
I'm still wondering if I should use just a plugin with name "GetBy" or rewrite the __call method at the classes where I want the functionality to work.
Well, the fact is that looking at the pog_base code I've seen that the plugin instantiation is done this way:
and I was wondering why not to use:
I've changed the code in my projects and it seems to be working using the second line. I don't know if there is any reason for using eval, is there any?
Have a nice day!