protected function getControllerMethod($requestedMethod)
    {
        $methodName = 'rpc' . str_replace(' ', '', ucwords(implode(' ', explode('-', $requestedMethod))));
        if (!method_exists($this->controller, $methodName)) {
            throw new \yii\web\NotFoundHttpException("Not found JSON-RPC method {$requestedMethod}.");
        }

        $method = new \ReflectionMethod($this->controller, $methodName);
        if (!$method->isPublic() || $method->getName() !== $methodName) {
            throw new \yii\web\NotFoundHttpException("Not found JSON-RPC method {$requestedMethod}.");
        }

        return $method;
    }