|
|||
|
Is it possible to write a function in my Zend_Db_Table class which will do all the formatting on a column in the result?
E.g. PHP Code:
Last edited by stm : 06-07-2008 at 09:08 AM. Reason: formatting |
|
|||
|
Use a custom Row class: Zend Framework: Documentation
You can override the __get method to call functions in your custom row class for properties that don't exist. For example: PHP Code:
PHP Code:
|
|
|||
|
Another way would be to provide an init() method in your custom row class, to populate a member variable after the row is created.
Building on Davidoff's example: PHP Code:
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|