/** * 获取工作日设置 */ public function getworkdayAction() { $request = $this->getRequest()->getParams(); $option = isset($request['option']) ? $request['option'] : 'list'; $condition = array('type' => isset($request['type']) ? $request['type'] : 0, 'date_from' => isset($request['date_from']) ? $request['date_from'] : date('Y-m-01'), 'date_to' => isset($request['date_to']) ? $request['date_to'] : date('Y-m-t')); /* echo '<pre>'; print_r($condition); */ $workday = new Hra_Model_Workday(); if ($option == 'list') { echo Zend_Json::encode($workday->getWorkdayList($condition)); } exit; }