]> git.mxchange.org Git - friendica.git/commitdiff
Remove AppHelper implementation from App class
authorArt4 <art4@wlabs.de>
Wed, 18 Dec 2024 21:30:36 +0000 (21:30 +0000)
committerArt4 <art4@wlabs.de>
Wed, 18 Dec 2024 21:30:36 +0000 (21:30 +0000)
src/App.php

index 58c617c1184ad69533cded7c0202b2f928325f41..48639177479ad347b451d6d2e21673b02d605361 100644 (file)
@@ -7,7 +7,6 @@
 
 namespace Friendica;
 
-use Exception;
 use Friendica\App\Arguments;
 use Friendica\App\BaseURL;
 use Friendica\App\Mode;
@@ -21,9 +20,7 @@ use Friendica\Core\Session\Capability\IHandleUserSessions;
 use Friendica\Database\Definition\DbaDefinition;
 use Friendica\Database\Definition\ViewDefinition;
 use Friendica\Module\Maintenance;
-use Friendica\Network\HTTPException\InternalServerErrorException;
 use Friendica\Security\Authentication;
-use Friendica\Core\Config\ValueObject\Cache;
 use Friendica\Core\Config\Capability\IManageConfigValues;
 use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues;
 use Friendica\Core\L10n;
@@ -48,7 +45,7 @@ use Psr\Log\LoggerInterface;
  * before we spit the page out.
  *
  */
-class App implements AppHelper
+class App
 {
        const PLATFORM = 'Friendica';
        const CODENAME = 'Yellow Archangel';
@@ -134,165 +131,6 @@ class App implements AppHelper
                $this->load($dbaDefinition, $viewDefinition);
        }
 
-       /**
-        * Set the profile owner ID
-        *
-        * @deprecated 2024.12 Use AppHelper::setProfileOwner() instead
-        *
-        * @param int $owner_id
-        * @return void
-        */
-       public function setProfileOwner(int $owner_id)
-       {
-               $this->appHelper->setProfileOwner($owner_id);
-       }
-
-       /**
-        * Get the profile owner ID
-        *
-        * @deprecated 2024.12 Use AppHelper::getProfileOwner() instead
-        *
-        * @return int
-        */
-       public function getProfileOwner(): int
-       {
-               return $this->appHelper->getProfileOwner();
-       }
-
-       /**
-        * Set the contact ID
-        *
-        * @deprecated 2024.12 Use AppHelper::setContactId() instead
-        *
-        * @param int $contact_id
-        * @return void
-        */
-       public function setContactId(int $contact_id)
-       {
-               $this->appHelper->setContactId($contact_id);
-       }
-
-       /**
-        * Get the contact ID
-        *
-        * @deprecated 2024.12 Use AppHelper::getContactId() instead
-        *
-        * @return int
-        */
-       public function getContactId(): int
-       {
-               return $this->appHelper->getContactId();
-       }
-
-       /**
-        * Set the timezone
-        *
-        * @deprecated 2024.12 Use AppHelper::setTimeZone() instead
-        *
-        * @param string $timezone A valid time zone identifier, see https://www.php.net/manual/en/timezones.php
-        * @return void
-        */
-       public function setTimeZone(string $timezone)
-       {
-               $this->appHelper->setTimeZone($timezone);
-       }
-
-       /**
-        * Get the timezone
-        *
-        * @deprecated 2024.12 Use AppHelper::getTimeZone() instead
-        */
-       public function getTimeZone(): string
-       {
-               return $this->appHelper->getTimeZone();
-       }
-
-       /**
-        * Set workerqueue information
-        *
-        * @deprecated 2024.12 Use AppHelper::setQueue() instead
-        *
-        * @param array $queue
-        * @return void
-        */
-       public function setQueue(array $queue)
-       {
-               $this->appHelper->setQueue($queue);
-       }
-
-       /**
-        * Fetch workerqueue information
-        *
-        * @deprecated 2024.12 Use AppHelper::getQueue() instead
-        *
-        * @return array Worker queue
-        */
-       public function getQueue(): array
-       {
-               return $this->appHelper->getQueue();
-       }
-
-       /**
-        * Fetch a specific workerqueue field
-        *
-        * @deprecated 2024.12 Use AppHelper::getQueueValue() instead
-        *
-        * @param string $index Work queue record to fetch
-        * @return mixed Work queue item or NULL if not found
-        */
-       public function getQueueValue(string $index)
-       {
-               return $this->appHelper->getQueueValue($index);
-       }
-
-       /**
-        * @deprecated 2024.12 Use AppHelper::setThemeInfoValue() instead
-        */
-       public function setThemeInfoValue(string $index, $value)
-       {
-               $this->appHelper->setThemeInfoValue($index, $value);
-       }
-
-       /**
-        * @deprecated 2024.12 Use AppHelper::getThemeInfo() instead
-        */
-       public function getThemeInfo()
-       {
-               return $this->appHelper->getThemeInfo();
-       }
-
-       /**
-        * @deprecated 2024.12 Use AppHelper::getThemeInfoValue() instead
-        */
-       public function getThemeInfoValue(string $index, $default = null)
-       {
-               return $this->appHelper->getThemeInfoValue($index, $default);
-       }
-
-       /**
-        * Returns the current config cache of this node
-        *
-        * @deprecated 2024.12 Use AppHelper::getConfigCache() instead
-        *
-        * @return Cache
-        */
-       public function getConfigCache()
-       {
-               return $this->appHelper->getConfigCache();
-       }
-
-       /**
-        * The basepath of this app
-        *
-        * @deprecated 2024.12 Use AppHelper::getBasePath() instead
-        *
-        * @return string Base path from configuration
-        */
-       public function getBasePath(): string
-       {
-               return $this->appHelper->getBasePath();
-       }
-
        /**
         * Load the whole app instance
         */
@@ -350,69 +188,6 @@ class App implements AppHelper
                $this->appHelper->setTimeZone($timezone);
        }
 
-       /**
-        * Returns the current theme name. May be overridden by the mobile theme name.
-        *
-        * @deprecated 2024.12 Use AppHelper::getCurrentTheme() instead
-        *
-        * @return string Current theme name or empty string in installation phase
-        * @throws Exception
-        */
-       public function getCurrentTheme(): string
-       {
-               return $this->appHelper->getCurrentTheme();
-       }
-
-       /**
-        * Returns the current mobile theme name.
-        *
-        * @deprecated 2024.12 Use AppHelper::getCurrentMobileTheme() instead
-        *
-        * @return string Mobile theme name or empty string if installer
-        * @throws Exception
-        */
-       public function getCurrentMobileTheme(): string
-       {
-               return $this->appHelper->getCurrentMobileTheme();
-       }
-
-       /**
-        * Setter for current theme name
-        *
-        * @deprecated 2024.12 Use AppHelper::setCurrentTheme() instead
-        *
-        * @param string $theme Name of current theme
-        */
-       public function setCurrentTheme(string $theme)
-       {
-               $this->appHelper->setCurrentTheme($theme);
-       }
-
-       /**
-        * Setter for current mobile theme name
-        *
-        * @deprecated 2024.12 Use AppHelper::setCurrentMobileTheme() instead
-        *
-        * @param string $theme Name of current mobile theme
-        */
-       public function setCurrentMobileTheme(string $theme)
-       {
-               $this->appHelper->setCurrentMobileTheme($theme);
-       }
-
-       /**
-        * Provide a sane default if nothing is chosen or the specified theme does not exist.
-        *
-        * @deprecated 2024.12 Use AppHelper::getCurrentThemeStylesheetPath() instead
-        *
-        * @return string Current theme's stylesheet path
-        * @throws Exception
-        */
-       public function getCurrentThemeStylesheetPath(): string
-       {
-               return $this->appHelper->getCurrentThemeStylesheetPath();
-       }
-
        /**
         * Frontend App script
         *
@@ -605,21 +380,6 @@ class App implements AppHelper
                $page->logRuntime($this->config, 'runFrontend');
        }
 
-       /**
-        * Automatically redirects to relative or absolute URL
-        * Should only be used if it isn't clear if the URL is either internal or external
-        *
-        * @deprecated 2024.12 Use AppHelper::redirect() instead
-        *
-        * @param string $toUrl The target URL
-        *
-        * @throws InternalServerErrorException
-        */
-       public function redirect(string $toUrl)
-       {
-               $this->appHelper->redirect($toUrl);
-       }
-
        /**
         * Log slow page executions
         *