Can i override fetchall method in a model? I need to check sth everytime fetchAll is called. The model extends Zend_db_table_abstract
To override this method you would need to subclass the Zend_Db_Table_Abstract. Like so:
<?php
abstract class My_Db_Table_Abstract extends Zend_Db_Table_Abstract
{
...
public function fetchAll($where, $order)
{
...
}
...
}
Then make sure your models extend My_Db_Table_Abstract instead. This way, you will always inherit your overridden fetchAll method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With