/** * @about Interface. * @deprecated Unable to get its exact output!! */ public function getsessionalAction() { $request = $this->getRequest(); $test_id = $request->getParam('test_id'); $format = $request->getParam('format', 'json'); if (1) { $values = array('department_id' => $this->department_id, 'test_type_id' => 'SESS', 'test_id' => $test_id); $model = new Acad_Model_Test_Sessional($values); $sessionals = $model->fetchAll(); $result = array(); foreach ($sessionals as $key => $sessional) { $result[$sessional->getSemester_id()][$sessional->getDate_of_conduct()][] = array($sessional->getTest_info_id(), $sessional->getDepartment_id(), $sessional->getDegree_id(), $sessional->getSubject_code(), $sessional->getSubject_name(), $sessional->getTime()); } switch (strtolower($format)) { case 'json': $this->_helper->logger($result); echo $this->_helper->json($result, false); return; default: $this->getResponse()->setException('Unsupported format request')->setHttpResponseCode(400); } } else { header("HTTP/1.1 400 Bad Request"); } // action body /*if ($result != null) { $this->_helper->json($result); } else { return new Exception('Wrong paramter', Zend_Log::ERR); }*/ }