PHP code example of craa / yii2-api-debugger

1. Go to this page and download the library: Download craa/yii2-api-debugger library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

craa / yii2-api-debugger example snippets


Yii::setAlias('@craa/ApiDebugger', '@app/yourpath/craa/api-debugger');

return [
    //...
    'modules' => [
        'api-debugger' => [
            'class' => 'craa\ApiDebugger\Module',
            'name' => '接口调试系统',
            'password' => '123',
            'allowedIPs' => ['*'],
            'baseModuleDir' => '@app',
            'baseModuleNamespace' => '\app',
            'view' => '@craa/ApiDebugger/views/default/index',
            'links' => [
                [
                    'text' => '<b>WIKI</b>',
                    'url' => 'http://github.com/craa/yii2-api-debugger',
                    'options' => [
                        'target' => '_blank',
                    ]
                ],
            ],
            'platforms' => [
                'iOS',
            ],
            'versions' => [
                '1.0.0',
            ]
        ],
    ]
];

/**
 * common module definition class
 * @name 公共模块
 * @enable true
 */
class Module extends \yii\base\Module

/**
 * Default controller for the `common` module
 * @name 默认控制器
 * @enable true
 */
class DefaultController extends Controller

    /**
     * @name 上传用户基本信息
     * @enable true
     * @method POST
     * @version >=2.1.0
     * @function 上传平台用户信息
     * @param int $uid [100] 用户ID XX平台用户ID
     * @param string $sid 会话ID
     * @param string $name 姓名
     * @param int $age 年龄 
     * @param -file- $headImg 头像 上传用户头像
     * @param string steps json字符串 
     * @param string userList json字符串 
     * @paramDetail
     * ===steps json字符串
     * string title 审批节点名称
     * string approver_id 审批用户id
     * string sort 审批步骤
     * ===userList json字符串
     * string name 姓名
     * string sex 性别
     * int sort 排序
     * @return
     * ===data
     * string uid 用户id
     * int sex 用户性别
     * array recordList 购物清单
     * ===recordList
     * int orderId 订单id
     * string ctime 购物时间
     * @exception
     */
     */
    public function actionUpdateInfo()