public function listFeesAction() { $guid = $this->_getParam('id'); $filter = $this->_getParam('filter', null); $fs = new FeeSchedule(); if (strlen($guid) > 0) { $fs->guid = $guid; $fs->populateByGuid(); } $rows = array(); if ($filter !== null) { $filter = str_replace('%_', '%', $filter); $iterator = $fs->getIteratorByFilters($filter); } else { $iterator = $fs->getIteratorByGuid(); } foreach ($iterator as $row) { $rows[] = $this->_generateFeeRowData($row); } $json = Zend_Controller_Action_HelperBroker::getStaticHelper('json'); $json->suppressExit = true; $json->direct(array('rows' => $rows)); }