モデル ディレクトリには、Zend_Db_Table_Abstract を拡張した多くのクラスがあります。
しかし、私は zend_paginator を使用する必要があり、これは Zend_Db_Select の結果である必要があります!!
したがって、このコードを使用すると(productCatはモデルクラスです)
$productCat = new ProductCat();
$rows = $productCat->FetchOrderByPriority();
// Get a Paginator object using Zend_Paginator's built-in factory.
$paginator = Zend_Paginator::factory($rows);
$this->view->paginator = $paginator;
うまくいきません!
このエラーが表示されます:
Catchable fatal error: Object of class Zend_Db_Table_Row could not be converted to string in
これは私のビューコードです:
<ul><?php foreach ($this->paginator as $item): ?>
<li><?php echo $item; ?></li><?php endforeach; ?></ul>
何か考えはありますか?