request = $request; } public function getRequest(): Request { return $this->request; } public function __construct(Request $request) { $this->request = $request; } public function getRequestBody() { $body = $this->getBodyFromRequest(); LogManager::LogXML($body, "API[REQUEST]", "Полученные данные: \n\n"); return $body; } protected function getBodyFromRequest() { return $this->getRequest()->getRawBody(); } }