protected function getMethodParams(\ReflectionMethod $reflectionMethod, $requestParams)
    {
        $actionParams = [];
        $methodParams = $reflectionMethod->getParameters();

        foreach ($methodParams as $param) {
            $paramName = $param->getName();
            if (!array_key_exists($paramName, $requestParams)) {
                throw new \yii\web\BadRequestHttpException("Not found JSON-RPC request parameter '{$paramName}'.");
            }

            $paramClass = $param->getClass();
            $actionParams[$paramName] = !empty($paramClass) ? $this->getParameterModel($paramName, $paramClass->name, $requestParams) : $requestParams[$paramName];
        }

        return $actionParams;
    }
protected function getMethodParams(\ReflectionMethod $reflectionMethod, $requestParams)
    {
        $actionParams = [];
        $methodParams = $reflectionMethod->getParameters();

        foreach ($methodParams as $param) {
            $paramName = $param->getName();
            if (!array_key_exists($paramName, $requestParams)) {
                throw new \yii\web\BadRequestHttpException("Not found JSON-RPC request parameter '{$paramName}'.");
            }

            $paramClass = $param->getClass();
            $actionParams[$paramName] = !empty($paramClass) ? $this->getParameterModel($paramName, $paramClass->name, $requestParams) : $requestParams[$paramName];
        }

        return $actionParams;
    }
protected function getMethodParams ( \ ReflectionMethod $ reflectionMethod , $ requestParams ) { $ actionParams = [ ] ; $ methodParams = $ reflectionMethod -> getParameters ( ) ; foreach ( $ methodParams as $ param ) { $ paramName = $ param -> getName ( ) ; if ( ! array_key_exists ( $ paramName , $ requestParams ) ) { throw new \ yii \ web \ BadRequestHttpException ( "Not found JSON-RPC request parameter '{$paramName}'." ) ; } $ paramClass = $ param -> getClass ( ) ; $ actionParams [ $ paramName ] = ! empty ( $ paramClass ) ? $ this -> getParameterModel ( $ paramName , $ paramClass -> name , $ requestParams ) : $ requestParams [ $ paramName ] ; } return $ actionParams ; }
Creates and initializes array of controller action method arguments
@param \ReflectionMethod $reflectionMethod
@param array $requestParams
@return array
@throws \yii\web\BadRequestHttpException
Creates and initializes array of controller action method arguments