]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Api/Friendica/Notification.php
Use rawContent for Special Options to avoid a protected options() method
[friendica.git] / src / Module / Api / Friendica / Notification.php
index 3057c8cb777c2f87601ed243857c1d2894591d8f..1f5ac9b488b8d99b23757e0acffe63fc4ebef505 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -31,7 +31,7 @@ use Friendica\Object\Api\Friendica\Notification as ApiNotification;
  */
 class Notification extends BaseApi
 {
-       public function rawContent()
+       protected function rawContent(array $request = [])
        {
                self::checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
@@ -43,7 +43,7 @@ class Notification extends BaseApi
                        $notifications[] = new ApiNotification($Notify);
                }
 
-               if (!empty(static::$parameters['extension']) && (static::$parameters['extension'] == 'xml')) {
+               if (!empty($this->parameters['extension']) && ($this->parameters['extension'] == 'xml')) {
                        $xmlnotes = [];
                        foreach ($notifications as $notification) {
                                $xmlnotes[] = ['@attributes' => $notification->toArray()];
@@ -56,6 +56,6 @@ class Notification extends BaseApi
                        $result = false;
                }
 
-               DI::apiResponse()->exit('notes', ['note' => $result], static::$parameters['extension'] ?? null);
+               $this->response->exit('notes', ['note' => $result], $this->parameters['extension'] ?? null);
        }
 }