public static function getTableInstance() { if (!self::$_table) { self::$_table = new Model_Table_EpcgExportInfo(); } return self::$_table; }
public function getAllEpcgAction() { $response = array(); $this->_helper->viewRenderer->setNoRender(true); $this->_helper->layout->disableLayout(); if ($this->getRequest()->getParam('iec_id') != null) { $iec_id = $this->getRequest()->getParam('iec_id'); $epcg_list = Model_EpcgExportInfo::getAllEpcgByIecNo($iec_id); if (!empty($epcg_list)) { $response['status'] = 1; $response['message'] = $epcg_list; } else { $response['status'] = 2; $response['message'] = 'No data found'; } } else { $response['status'] = 0; $response['message'] = 'No parameters passed'; } echo json_encode($response); }