colly_wyx
2018-04-28 d50ec1d43fd3b57305425d38ecc7c84f201e74cf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
 * 默认接口服务类
 *
 * @author Colly <[676734462@qq.com]>
 */
 
class Api_Default extends PhalApi_Api {
 
    public function getRules() {
        return array(
            'index' => array(
                'username'     => array('name' => 'username', 'default' => 'PHPer', ),
            ),
        );
    }
    
    /**
     * 默认接口服务
     * @return string title 标题
     * @return string content 内容
     * @return string version 版本,格式:X.X.X
     * @return int time 当前时间戳
     */
    public function index() {
        return array(
            'title' => '接口访问成功!',
            'content' => '请根据文档进行调用',
           // 'version' => PHALAPI_VERSION,
            'time' => $_SERVER['REQUEST_TIME'],
        );
    }
}