Sönke Ruempler wrote:
Hi Creole developers,
I just played around with creole and the integration into my own
framework. I use Smarty as template system and want to take advantage of
creole's iterator implementation. This allows using foreach directly but
smarty has some special things like doing '(array)' type conversion
before using the 'array' etc. There was a request in Jul 2004 from
another guy on the smarty devel list but his patch is not applied yet in
the current version of Smarty. See here:
http://news.php.net/php.smarty.dev/2510
I looked deeper into creole and noticed that I can't sub-class the
ResultSet of, for example, MySQL with my own class. If I could I would
write a subclass that implements the SPL interface ArrayAccess. I tested
what happens if I convert an object that implements ArrayAccess to an
array (with the (array) type conversion operator) and it worked.
So my question is if there is a chance that creole's ResultSets can
implement ArrayAccess. Or maybe you have other hints for me to get this
work. I thought this issue would be more common but a google search on
"creole" and "arrayaccess" gave me no results.
Thanks in advance, soenke.
arrayaccess is quite slow, iv already worked with it to try out some
ideas, whilst i agree that iterators should be in creole, something like
arrayaccess probably would be better suited to propel or maybe jargon, i
dont know which it would fit under. remember, arrayaccess means that you
can set it so it automatically updates fields when you change them also,
not just readonly, as well as that you could have an option to do
delayed update and use the desctructor to batch update any changed
fields and values together in a transaction instead of as each is done
in the script.
the iterator stuff that is now in smarty cvs looks fun, thanks for
pointing that out!
Cameron
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|