]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Notify.php
Move L10n::t() calls to DI::l10n()->t() calls
[friendica.git] / src / Model / Notify.php
index eef481ad8fb00b57d34c80547e613c542fad1ff6..49e538d7ba619c718dc4c5250f7eaf9fb2e9dbb9 100644 (file)
@@ -4,14 +4,14 @@ namespace Friendica\Model;
 
 use Exception;
 use Friendica\App;
-use Friendica\BaseObject;
 use Friendica\Content\Text\BBCode;
 use Friendica\Content\Text\HTML;
-use Friendica\Core\Config\PConfiguration;
+use Friendica\Core\Config\IPConfiguration;
 use Friendica\Core\L10n\L10n;
 use Friendica\Core\Protocol;
 use Friendica\Core\System;
 use Friendica\Database\Database;
+use Friendica\DI;
 use Friendica\Protocol\Activity;
 use Friendica\Util\DateTimeFormat;
 use Friendica\Util\Proxy as ProxyUtils;
@@ -22,10 +22,10 @@ use Psr\Log\LoggerInterface;
 use Friendica\Network\HTTPException;
 
 /**
- * @brief Methods for read and write notifications from/to database
+ * Methods for read and write notifications from/to database
  *  or for formatting notifications
  */
-final class Notify extends BaseObject
+final class Notify
 {
        /** @var int The default limit of notifies per page */
        const DEFAULT_PAGE_LIMIT = 80;
@@ -71,13 +71,13 @@ final class Notify extends BaseObject
        private $args;
        /** @var App\BaseURL */
        private $baseUrl;
-       /** @var PConfiguration */
+       /** @var IPConfiguration */
        private $pConfig;
        /** @var LoggerInterface */
        private $logger;
 
        public function __construct(Database $dba, L10n $l10n, App\Arguments $args, App\BaseURL $baseUrl,
-                                   PConfiguration $pConfig, LoggerInterface $logger)
+                                   IPConfiguration $pConfig, LoggerInterface $logger)
        {
                $this->dba     = $dba;
                $this->l10n    = $l10n;
@@ -164,7 +164,7 @@ final class Notify extends BaseObject
        }
 
        /**
-        * @brief set seen state of $note of local_user()
+        * set seen state of $note of local_user()
         *
         * @param array $note note array
         * @param bool  $seen optional true or false, default true
@@ -197,7 +197,7 @@ final class Notify extends BaseObject
        }
 
        /**
-        * @brief List of pages for the Notifications TabBar
+        * List of pages for the Notifications TabBar
         *
         * @return array with with notifications TabBar data
         * @throws Exception
@@ -515,7 +515,7 @@ final class Notify extends BaseObject
                $ident    = self::PERSONAL;
                $notifies = [];
 
-               $myurl     = str_replace('http://', '', self::getApp()->contact['nurl']);
+               $myurl     = str_replace('http://', '', DI::app()->contact['nurl']);
                $diasp_url = str_replace('/profile/', '/u/', $myurl);
 
                $condition = ["NOT `wall` AND `uid` = ? AND (`item`.`author-id` = ? OR `item`.`tag` REGEXP ? OR `item`.`tag` REGEXP ?)",
@@ -544,7 +544,7 @@ final class Notify extends BaseObject
        }
 
        /**
-        * @brief Get home notifications
+        * Get home notifications
         *
         * @param bool $seen    False => only include notifications into the query
         *                            which aren't marked as "seen"
@@ -587,7 +587,7 @@ final class Notify extends BaseObject
        }
 
        /**
-        * @brief Get introductions
+        * Get introductions
         *
         * @param bool $all     If false only include introductions into the query
         *                      which aren't marked as ignored
@@ -650,7 +650,7 @@ final class Notify extends BaseObject
        }
 
        /**
-        * @brief Format the notification query in an usable array
+        * Format the notification query in an usable array
         *
         * @param array $intros The array from the db query
         *
@@ -669,7 +669,7 @@ final class Notify extends BaseObject
                        // We have to distinguish between these two because they use different data.
                        // Contact suggestions
                        if ($intro['fid']) {
-                               $return_addr = bin2hex(self::getApp()->user['nickname'] . '@' .
+                               $return_addr = bin2hex(DI::app()->user['nickname'] . '@' .
                                                       $this->baseUrl->getHostName() .
                                                       (($this->baseUrl->getURLPath()) ? '/' . $this->baseUrl->getURLPath() : ''));
 
@@ -738,8 +738,8 @@ final class Notify extends BaseObject
        }
 
        /**
-        * @brief Check for missing contact data and try to fetch the data from
-        *     from other sources
+        * Check for missing contact data and try to fetch the data from
+        * from other sources
         *
         * @param array $intro The input array with the intro data
         *