ExamCategoryController.class.php 919 Bytes
<?php
/**
 * 考试分类列表
 * User: yingcai
 * Date: 2017/10/12
 * Time: 下午2:44
 */

namespace Apicp\Controller\Exam;

use Common\Common\ExamHelper;

class ExamCategoryController extends \Apicp\Controller\AbstractController
{
    /**
     * ExamCate
     * @author houyingcai
     * @desc 考试分类列表
     * @return array
               array(
                    'list' => array( // 列表数据
                        array(
                            'ca_id' => 1, // 分类ID
                            'ca_name' => '分类一', // 分类名称
                        ),
                    ),
               )
     */
    public function Index_post()
    {
        $exam_helper = &ExamHelper::instance();

        $list = $exam_helper->exam_category_open_list();

        foreach ($list as &$v) {
            $v['ec_id'] = intval($v['ec_id']);
        }

        $this->_result = $list;
    }
}