public function searchAction() { $email = $this->_getParam('email', null); $name = $this->_getParam('name', null); if ($email) { //根据邮箱查找 $doctors = Application_Model_M_Doctor::fetchByEmailLike($email); } elseif ($name) { $doctors = Application_Model_M_Doctor::fetchByNameLike($name); } else { $doctors = array(); } $this->view->doctors = $doctors; }