public static function getRequestParams($type = 'all')
    {
        $request = Yii::$app->getRequest();
        switch ($type) {
            case 'get':
                $params = $request->get();
                break;

            case 'post':
                $params = $request->post();
                break;

            case 'all':
            default:
                $params = ArrayHelper::merge($request->get(), $request->post());
                break;
        }

        return $params;
    }