session = $session; } protected function rawContent(array $request = []) { if (!$this->session->isAuthenticated()) { throw new HttpException\ForbiddenException($this->l10n->t('Access denied.')); } if (empty($this->parameters['id'])) { throw new HTTPException\BadRequestException(); } $item = Post::selectFirstForUser($this->session->getLocalUserId(), ['language'], ['uid' => [0, $this->session->getLocalUserId()], 'uri-id' => $this->parameters['id']]); if (empty($item)) { throw new HTTPException\NotFoundException(); } $this->httpExit(Item::getLanguageMessage($item)); } }