Is there an easy way of extending Zend_Db_Adapter_Abstract?
I hoped there would be something like a plugin system, but didn't find
anything...
Next try was with a decorator, but since there is now
Zend_Db_Adapter_Interface, this sucks too. Will loose all type hints
with this one.
Anyone ever did something in this direction? Would appreciate any hints...
If you ask yourself what I need this for, I have added RDBMs specific
abstractions of the most common functions to use with Zend_Db_Select,
like (in mysql terms) NOW(), UNIX_TIMESTAMP(), DATE_ADD(), and so on. We
need our code running with mysql, postgres and mssql, it works nice with
extending Zend_Db_Expr, but I need to know the type of the used RDMBs.
So I hoped I would be able to use something like $db->fn()->now(). Like
I said, works fine with a decorator, but without type hints.
Any hints?
Bye,
Stephan
没有评论:
发表评论