diff --git a/src/Content/Conversation.php b/src/Content/Conversation.php index 807fb6c0b1..a31132cc74 100644 --- a/src/Content/Conversation.php +++ b/src/Content/Conversation.php @@ -7,9 +7,11 @@ namespace Friendica\Content; -use Friendica\App; use Friendica\App\Arguments; use Friendica\App\BaseURL; +use Friendica\App\Mode; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Core\ACL; use Friendica\Core\Config\Capability\IManageConfigValues; @@ -32,8 +34,7 @@ use Friendica\Network\HTTPException\InternalServerErrorException; use Friendica\Object\Post as PostObject; use Friendica\Object\Thread; use Friendica\Protocol\Activity; -use Friendica\User\Settings\Entity\UserGServer; -use Friendica\User\Settings\Repository; +use Friendica\User\Settings\Repository\UserGServer; use Friendica\Util\Crypto; use Friendica\Util\DateTimeFormat; use Friendica\Util\Profiler; @@ -64,7 +65,7 @@ class Conversation private $logger; /** @var Item */ private $item; - /** @var App\Arguments */ + /** @var Arguments */ private $args; /** @var IManagePersonalConfigValues */ private $pConfig; @@ -72,18 +73,18 @@ class Conversation private $baseURL; /** @var IManageConfigValues */ private $config; - /** @var App */ - private $app; - /** @var App\Page */ + /** @var AppHelper */ + private $appHelper; + /** @var Page */ private $page; - /** @var App\Mode */ + /** @var Mode */ private $mode; /** @var IHandleUserSessions */ private $session; - /** @var Repository\UserGServer */ + /** @var UserGServer */ private $userGServer; - public function __construct(Repository\UserGServer $userGServer, LoggerInterface $logger, Profiler $profiler, Activity $activity, L10n $l10n, Item $item, Arguments $args, BaseURL $baseURL, IManageConfigValues $config, IManagePersonalConfigValues $pConfig, App\Page $page, App\Mode $mode, App $app, IHandleUserSessions $session) + public function __construct(UserGServer $userGServer, LoggerInterface $logger, Profiler $profiler, Activity $activity, L10n $l10n, Item $item, Arguments $args, BaseURL $baseURL, IManageConfigValues $config, IManagePersonalConfigValues $pConfig, Page $page, Mode $mode, AppHelper $appHelper, IHandleUserSessions $session) { $this->activity = $activity; $this->item = $item; @@ -96,7 +97,7 @@ class Conversation $this->args = $args; $this->pConfig = $pConfig; $this->page = $page; - $this->app = $app; + $this->appHelper = $appHelper; $this->session = $session; $this->userGServer = $userGServer; } @@ -1017,7 +1018,7 @@ class Conversation $emojis[$count['uri-id']][$count['reaction']]['title'] = []; } - // @todo The following code should be removed, once that we display activity authors on demand + // @todo The following code should be removed, once that we display activity authors on demand $activity_verbs = [ Activity::LIKE, Activity::DISLIKE, diff --git a/src/Content/Item.php b/src/Content/Item.php index 3082a3ff4c..a5a1a17a19 100644 --- a/src/Content/Item.php +++ b/src/Content/Item.php @@ -7,8 +7,8 @@ namespace Friendica\Content; -use Friendica\App; use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Content\Text\BBCode; use Friendica\Content\Text\BBCode\Video; use Friendica\Content\Text\HTML; @@ -66,10 +66,10 @@ class Item private $baseURL; /** @var Emailer */ private $emailer; - /** @var App */ - private $app; + /** @var AppHelper */ + private $appHelper; - public function __construct(Profiler $profiler, Activity $activity, L10n $l10n, IHandleUserSessions $userSession, Video $bbCodeVideo, ACLFormatter $aclFormatter, IManagePersonalConfigValues $pConfig, BaseURL $baseURL, Emailer $emailer, App $app) + public function __construct(Profiler $profiler, Activity $activity, L10n $l10n, IHandleUserSessions $userSession, Video $bbCodeVideo, ACLFormatter $aclFormatter, IManagePersonalConfigValues $pConfig, BaseURL $baseURL, Emailer $emailer, AppHelper $appHelper) { $this->profiler = $profiler; $this->activity = $activity; @@ -80,7 +80,7 @@ class Item $this->baseURL = $baseURL; $this->pConfig = $pConfig; $this->emailer = $emailer; - $this->app = $app; + $this->appHelper = $appHelper; } /** diff --git a/src/Module/Api/Friendica/DirectMessages/Search.php b/src/Module/Api/Friendica/DirectMessages/Search.php index 0aacdf9b36..18eee80af8 100644 --- a/src/Module/Api/Friendica/DirectMessages/Search.php +++ b/src/Module/Api/Friendica/DirectMessages/Search.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Friendica\DirectMessages; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Database\Database; use Friendica\Database\DBA; @@ -30,9 +32,9 @@ class Search extends BaseApi /** @var DirectMessage */ private $directMessage; - public function __construct(DirectMessage $directMessage, Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(DirectMessage $directMessage, Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->dba = $dba; $this->directMessage = $directMessage; diff --git a/src/Module/Api/Friendica/Photo.php b/src/Module/Api/Friendica/Photo.php index 31c54b7639..a54c41b3c5 100644 --- a/src/Module/Api/Friendica/Photo.php +++ b/src/Module/Api/Friendica/Photo.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Friendica; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Factory\Api\Friendica\Photo as FriendicaPhoto; use Friendica\Module\BaseApi; @@ -23,9 +25,9 @@ class Photo extends BaseApi private $friendicaPhoto; - public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->friendicaPhoto = $friendicaPhoto; } diff --git a/src/Module/Api/Friendica/Photo/Create.php b/src/Module/Api/Friendica/Photo/Create.php index 49b943f188..4a50083f35 100644 --- a/src/Module/Api/Friendica/Photo/Create.php +++ b/src/Module/Api/Friendica/Photo/Create.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Friendica\Photo; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\ACL; use Friendica\Core\L10n; use Friendica\Factory\Api\Friendica\Photo as FriendicaPhoto; @@ -27,9 +29,9 @@ class Create extends BaseApi private $friendicaPhoto; - public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->friendicaPhoto = $friendicaPhoto; } diff --git a/src/Module/Api/Friendica/Photo/Lists.php b/src/Module/Api/Friendica/Photo/Lists.php index c493c3e922..174bd06ce7 100644 --- a/src/Module/Api/Friendica/Photo/Lists.php +++ b/src/Module/Api/Friendica/Photo/Lists.php @@ -7,9 +7,11 @@ namespace Friendica\Module\Api\Friendica\Photo; -use Friendica\Database\DBA; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; +use Friendica\Database\DBA; use Friendica\Factory\Api\Friendica\Photo as FriendicaPhoto; use Friendica\Module\BaseApi; use Friendica\Model\Contact; @@ -29,9 +31,9 @@ class Lists extends BaseApi private $friendicaPhoto; - public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->friendicaPhoto = $friendicaPhoto; } diff --git a/src/Module/Api/Friendica/Photo/Update.php b/src/Module/Api/Friendica/Photo/Update.php index 8c072541d3..2a3929189f 100644 --- a/src/Module/Api/Friendica/Photo/Update.php +++ b/src/Module/Api/Friendica/Photo/Update.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Friendica\Photo; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\ACL; use Friendica\Core\L10n; use Friendica\Factory\Api\Friendica\Photo as FriendicaPhoto; @@ -27,9 +29,9 @@ class Update extends BaseApi private $friendicaPhoto; - public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->friendicaPhoto = $friendicaPhoto; } diff --git a/src/Module/Api/Friendica/Photoalbum/Show.php b/src/Module/Api/Friendica/Photoalbum/Show.php index 8542ea1ba7..48b10195c9 100644 --- a/src/Module/Api/Friendica/Photoalbum/Show.php +++ b/src/Module/Api/Friendica/Photoalbum/Show.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Friendica\Photoalbum; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Factory\Api\Friendica\Photo as FriendicaPhoto; use Friendica\Model\Contact; @@ -29,9 +31,9 @@ class Show extends BaseApi private $friendicaPhoto; - public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(FriendicaPhoto $friendicaPhoto, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->friendicaPhoto = $friendicaPhoto; } diff --git a/src/Module/Api/Mastodon/Instance.php b/src/Module/Api/Mastodon/Instance.php index 6b7ddfb3e1..2b50613290 100644 --- a/src/Module/Api/Mastodon/Instance.php +++ b/src/Module/Api/Mastodon/Instance.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Mastodon; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; use Friendica\Core\System; @@ -37,9 +39,9 @@ class Instance extends BaseApi /** @var AccountFactory */ private $accountFactory; - public function __construct(AccountFactory $accountFactory, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, Database $database, IManageConfigValues $config, array $server, array $parameters = []) + public function __construct(AccountFactory $accountFactory, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, Database $database, IManageConfigValues $config, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->database = $database; $this->config = $config; diff --git a/src/Module/Api/Mastodon/Instance/ExtendedDescription.php b/src/Module/Api/Mastodon/Instance/ExtendedDescription.php index 886aa64e04..03e2ca17ea 100644 --- a/src/Module/Api/Mastodon/Instance/ExtendedDescription.php +++ b/src/Module/Api/Mastodon/Instance/ExtendedDescription.php @@ -8,7 +8,9 @@ namespace Friendica\Module\Api\Mastodon\Instance; use DateTime; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; use Friendica\Model\User; @@ -26,9 +28,9 @@ class ExtendedDescription extends BaseApi { private IManageConfigValues $config; - public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, IManageConfigValues $config, array $server, array $parameters = []) + public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, IManageConfigValues $config, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->config = $config; } diff --git a/src/Module/Api/Mastodon/InstanceV2.php b/src/Module/Api/Mastodon/InstanceV2.php index f33f60b2c6..4cb3af66b9 100644 --- a/src/Module/Api/Mastodon/InstanceV2.php +++ b/src/Module/Api/Mastodon/InstanceV2.php @@ -9,6 +9,9 @@ namespace Friendica\Module\Api\Mastodon; use Exception; use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Contact\Header; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; @@ -41,10 +44,10 @@ class InstanceV2 extends BaseApi public function __construct( \Friendica\Factory\Api\Mastodon\Error $errorFactory, - App $app, + AppHelper $appHelper, L10n $l10n, - App\BaseURL $baseUrl, - App\Arguments $args, + BaseURL $baseUrl, + Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, @@ -53,7 +56,7 @@ class InstanceV2 extends BaseApi array $server, array $parameters = [] ) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->database = $database; $this->config = $config; diff --git a/src/Module/Api/Mastodon/Lists.php b/src/Module/Api/Mastodon/Lists.php index 5fcf926d02..b2f3292d9e 100644 --- a/src/Module/Api/Mastodon/Lists.php +++ b/src/Module/Api/Mastodon/Lists.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Mastodon; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\DI; use Friendica\Content\Conversation\Factory\Channel as ChannelFactory; @@ -29,9 +31,9 @@ class Lists extends BaseApi /** @var Repository\UserDefinedChannel */ protected $userDefinedChannel; - public function __construct(Repository\UserDefinedChannel $userDefinedChannel, ChannelFactory $channel, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(Repository\UserDefinedChannel $userDefinedChannel, ChannelFactory $channel, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->channel = $channel; $this->userDefinedChannel = $userDefinedChannel; diff --git a/src/Module/Api/Mastodon/PushSubscription.php b/src/Module/Api/Mastodon/PushSubscription.php index 9ddeb4eb23..a83263bb24 100644 --- a/src/Module/Api/Mastodon/PushSubscription.php +++ b/src/Module/Api/Mastodon/PushSubscription.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Mastodon; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Factory\Api\Mastodon\Error; use Friendica\Factory\Api\Mastodon\Subscription as SubscriptionFactory; @@ -26,9 +28,9 @@ class PushSubscription extends BaseApi /** @var SubscriptionFactory */ protected $subscriptionFac; - public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, SubscriptionFactory $subscriptionFac, array $server, array $parameters = []) + public function __construct(Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, SubscriptionFactory $subscriptionFac, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->subscriptionFac = $subscriptionFac; } diff --git a/src/Module/Api/Mastodon/Reports.php b/src/Module/Api/Mastodon/Reports.php index eff8bbe679..66c9b518a7 100644 --- a/src/Module/Api/Mastodon/Reports.php +++ b/src/Module/Api/Mastodon/Reports.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Mastodon; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Core\System; use Friendica\Model\Contact; @@ -27,9 +29,9 @@ class Reports extends BaseApi /** @var \Friendica\Moderation\Repository\Report */ private $reportRepo; - public function __construct(\Friendica\Moderation\Repository\Report $reportRepo, \Friendica\Moderation\Factory\Report $reportFactory, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(\Friendica\Moderation\Repository\Report $reportRepo, \Friendica\Moderation\Factory\Report $reportFactory, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->reportFactory = $reportFactory; $this->reportRepo = $reportRepo; diff --git a/src/Module/Api/Mastodon/Timelines/ListTimeline.php b/src/Module/Api/Mastodon/Timelines/ListTimeline.php index ef777d64bb..249955fdb3 100644 --- a/src/Module/Api/Mastodon/Timelines/ListTimeline.php +++ b/src/Module/Api/Mastodon/Timelines/ListTimeline.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Mastodon\Timelines; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Core\Logger; use Friendica\Database\DBA; @@ -34,9 +36,9 @@ class ListTimeline extends BaseApi /** @var Timeline */ protected $timeline; - public function __construct(Timeline $timeline, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(Timeline $timeline, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->timeline = $timeline; } diff --git a/src/Module/Api/Mastodon/Timelines/PublicTimeline.php b/src/Module/Api/Mastodon/Timelines/PublicTimeline.php index 16e6149df3..411a159037 100644 --- a/src/Module/Api/Mastodon/Timelines/PublicTimeline.php +++ b/src/Module/Api/Mastodon/Timelines/PublicTimeline.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Mastodon\Timelines; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; use Friendica\Core\Logger; @@ -34,9 +36,9 @@ class PublicTimeline extends BaseApi */ private $config; - public function __construct(IManageConfigValues $config, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(IManageConfigValues $config, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->config = $config; } /** diff --git a/src/Module/Api/Mastodon/Trends/Statuses.php b/src/Module/Api/Mastodon/Trends/Statuses.php index b63d3f9ca4..142766593d 100644 --- a/src/Module/Api/Mastodon/Trends/Statuses.php +++ b/src/Module/Api/Mastodon/Trends/Statuses.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Mastodon\Trends; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; use Friendica\Core\Logger; @@ -32,9 +34,9 @@ class Statuses extends BaseApi */ private $config; - public function __construct(IManageConfigValues $config, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(IManageConfigValues $config, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->config = $config; } diff --git a/src/Module/Api/Twitter/ContactEndpoint.php b/src/Module/Api/Twitter/ContactEndpoint.php index 3896351ded..1781a17ce2 100644 --- a/src/Module/Api/Twitter/ContactEndpoint.php +++ b/src/Module/Api/Twitter/ContactEndpoint.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Twitter; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\DI; use Friendica\Model\User; @@ -24,9 +26,9 @@ abstract class ContactEndpoint extends BaseApi const DEFAULT_COUNT = 20; const MAX_COUNT = 200; - public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->checkAllowedScope(self::SCOPE_READ); } diff --git a/src/Module/Api/Twitter/DirectMessages/Destroy.php b/src/Module/Api/Twitter/DirectMessages/Destroy.php index 8676e91fba..36494b4a66 100644 --- a/src/Module/Api/Twitter/DirectMessages/Destroy.php +++ b/src/Module/Api/Twitter/DirectMessages/Destroy.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Twitter\DirectMessages; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Database\Database; use Friendica\Database\DBA; @@ -27,9 +29,9 @@ class Destroy extends BaseApi /** @var Database */ private $dba; - public function __construct(Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->dba = $dba; } diff --git a/src/Module/Api/Twitter/DirectMessages/NewDM.php b/src/Module/Api/Twitter/DirectMessages/NewDM.php index 170c11fb9d..8dd9838297 100644 --- a/src/Module/Api/Twitter/DirectMessages/NewDM.php +++ b/src/Module/Api/Twitter/DirectMessages/NewDM.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Twitter\DirectMessages; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Database\Database; use Friendica\Factory\Api\Twitter\DirectMessage; @@ -32,9 +34,9 @@ class NewDM extends BaseApi /** @var DirectMessage */ private $directMessage; - public function __construct(DirectMessage $directMessage, Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(DirectMessage $directMessage, Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->dba = $dba; $this->directMessage = $directMessage; diff --git a/src/Module/Api/Twitter/DirectMessagesEndpoint.php b/src/Module/Api/Twitter/DirectMessagesEndpoint.php index 97f1de1828..e4bf7b92fb 100644 --- a/src/Module/Api/Twitter/DirectMessagesEndpoint.php +++ b/src/Module/Api/Twitter/DirectMessagesEndpoint.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Twitter; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Database\Database; use Friendica\Database\DBA; @@ -26,9 +28,9 @@ abstract class DirectMessagesEndpoint extends BaseApi /** @var DirectMessage */ private $directMessage; - public function __construct(DirectMessage $directMessage, Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(DirectMessage $directMessage, Database $dba, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->dba = $dba; $this->directMessage = $directMessage; diff --git a/src/Module/Api/Twitter/Friendships/Destroy.php b/src/Module/Api/Twitter/Friendships/Destroy.php index d7f65907be..cf014134c0 100644 --- a/src/Module/Api/Twitter/Friendships/Destroy.php +++ b/src/Module/Api/Twitter/Friendships/Destroy.php @@ -8,7 +8,9 @@ namespace Friendica\Module\Api\Twitter\Friendships; use Exception; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Core\Logger; use Friendica\Factory\Api\Twitter\User as TwitterUser; @@ -31,9 +33,9 @@ class Destroy extends ContactEndpoint /** @var TwitterUser */ private $twitterUser; - public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, TwitterUser $twitterUser, array $server, array $parameters = []) + public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, TwitterUser $twitterUser, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->twitterUser = $twitterUser; } diff --git a/src/Module/Api/Twitter/Lists/Create.php b/src/Module/Api/Twitter/Lists/Create.php index e641b22ac0..4343a75eea 100644 --- a/src/Module/Api/Twitter/Lists/Create.php +++ b/src/Module/Api/Twitter/Lists/Create.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Twitter\Lists; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Database\Database; use Friendica\Factory\Api\Friendica\Circle as FriendicaCircle; @@ -32,9 +34,9 @@ class Create extends BaseApi /** @var Database */ private $dba; - public function __construct(Database $dba, FriendicaCircle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(Database $dba, FriendicaCircle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->dba = $dba; $this->friendicaCircle = $friendicaCircle; diff --git a/src/Module/Api/Twitter/Lists/Destroy.php b/src/Module/Api/Twitter/Lists/Destroy.php index 48b9a4e026..34a8d8a99d 100644 --- a/src/Module/Api/Twitter/Lists/Destroy.php +++ b/src/Module/Api/Twitter/Lists/Destroy.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Twitter\Lists; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Database\Database; use Friendica\Factory\Api\Friendica\Circle as FriendicaCirle; @@ -32,9 +34,9 @@ class Destroy extends BaseApi /** @var Database */ private $dba; - public function __construct(Database $dba, FriendicaCirle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(Database $dba, FriendicaCirle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->dba = $dba; $this->friendicaCircle = $friendicaCircle; diff --git a/src/Module/Api/Twitter/Lists/Ownership.php b/src/Module/Api/Twitter/Lists/Ownership.php index 16d91efe8d..bdf34ed280 100644 --- a/src/Module/Api/Twitter/Lists/Ownership.php +++ b/src/Module/Api/Twitter/Lists/Ownership.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Twitter\Lists; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Database\Database; use Friendica\Factory\Api\Friendica\Circle as FriendicaCircle; @@ -30,9 +32,9 @@ class Ownership extends BaseApi /** @var Database */ private $dba; - public function __construct(Database $dba, FriendicaCircle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(Database $dba, FriendicaCircle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->dba = $dba; $this->friendicaCircle = $friendicaCircle; diff --git a/src/Module/Api/Twitter/Lists/Statuses.php b/src/Module/Api/Twitter/Lists/Statuses.php index 5d067a21f1..5b501f3fa3 100644 --- a/src/Module/Api/Twitter/Lists/Statuses.php +++ b/src/Module/Api/Twitter/Lists/Statuses.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Twitter\Lists; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Database\Database; use Friendica\Database\DBA; @@ -34,9 +36,9 @@ class Statuses extends BaseApi /** @var Database */ private $dba; - public function __construct(Database $dba, TwitterStatus $twitterStatus, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(Database $dba, TwitterStatus $twitterStatus, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->dba = $dba; $this->twitterStatus = $twitterStatus; diff --git a/src/Module/Api/Twitter/Lists/Update.php b/src/Module/Api/Twitter/Lists/Update.php index f255080df4..c5c368a741 100644 --- a/src/Module/Api/Twitter/Lists/Update.php +++ b/src/Module/Api/Twitter/Lists/Update.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Api\Twitter\Lists; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Database\Database; use Friendica\Factory\Api\Friendica\Circle as FriendicaCircle; @@ -32,9 +34,9 @@ class Update extends BaseApi /** @var Database */ private $dba; - public function __construct(Database $dba, FriendicaCircle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(Database $dba, FriendicaCircle $friendicaCircle, \Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { - parent::__construct($errorFactory, $app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($errorFactory, $appHelper, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->dba = $dba; $this->friendicaCircle = $friendicaCircle; diff --git a/src/Module/BaseApi.php b/src/Module/BaseApi.php index 4b3b817816..e5ec4db8dc 100644 --- a/src/Module/BaseApi.php +++ b/src/Module/BaseApi.php @@ -8,8 +8,10 @@ namespace Friendica\Module; use DateTime; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; use Friendica\App\Router; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Core\L10n; use Friendica\Core\Logger; @@ -51,8 +53,8 @@ class BaseApi extends BaseModule */ protected static $request = []; - /** @var App */ - protected $app; + /** @var AppHelper */ + protected $appHelper; /** @var ApiResponse */ protected $response; @@ -60,11 +62,11 @@ class BaseApi extends BaseModule /** @var \Friendica\Factory\Api\Mastodon\Error */ protected $errorFactory; - public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(\Friendica\Factory\Api\Mastodon\Error $errorFactory, AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->app = $app; + $this->appHelper = $appHelper; $this->errorFactory = $errorFactory; } diff --git a/src/Module/BaseModeration.php b/src/Module/BaseModeration.php index 797a73b2f8..e72698f259 100644 --- a/src/Module/BaseModeration.php +++ b/src/Module/BaseModeration.php @@ -7,7 +7,10 @@ namespace Friendica\Module; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Core\L10n; use Friendica\Core\Renderer; @@ -33,18 +36,18 @@ abstract class BaseModeration extends BaseModule protected $session; /** @var SystemMessages */ protected $systemMessages; - /** @var App */ - protected $app; - /** @var App\Page */ + /** @var AppHelper */ + protected $appHelper; + /** @var Page */ protected $page; - public function __construct(App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->session = $session; $this->systemMessages = $systemMessages; - $this->app = $app; + $this->appHelper = $appHelper; $this->page = $page; } diff --git a/src/Module/Calendar/Event/Show.php b/src/Module/Calendar/Event/Show.php index 175bc18707..6cfe9b5208 100644 --- a/src/Module/Calendar/Event/Show.php +++ b/src/Module/Calendar/Event/Show.php @@ -7,15 +7,14 @@ namespace Friendica\Module\Calendar\Event; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\BaseModule; -use Friendica\Content\Feature; use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\Core\Session\Capability\IHandleUserSessions; -use Friendica\Core\System; use Friendica\Model\Event; -use Friendica\Model\User; use Friendica\Module\Response; use Friendica\Network\HTTPException; use Friendica\Util\Profiler; @@ -28,15 +27,15 @@ class Show extends BaseModule { /** @var IHandleUserSessions */ protected $session; - /** @var App */ - private $app; + /** @var AppHelper */ + protected $appHelper; - public function __construct(App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, array $server, array $parameters = []) + public function __construct(AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->session = $session; - $this->app = $app; + $this->session = $session; + $this->appHelper = $appHelper; } protected function rawContent(array $request = []) diff --git a/src/Module/Calendar/Export.php b/src/Module/Calendar/Export.php index 9e8141ad4b..ef16636406 100644 --- a/src/Module/Calendar/Export.php +++ b/src/Module/Calendar/Export.php @@ -7,16 +7,16 @@ namespace Friendica\Module\Calendar; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Content\Feature; use Friendica\Core\L10n; use Friendica\Core\Session\Capability\IHandleUserSessions; use Friendica\Model\Event; use Friendica\Model\Profile; -use Friendica\Model\User; use Friendica\Module\Response; -use Friendica\Module\Security\Login; use Friendica\Navigation\SystemMessages; use Friendica\Network\HTTPException; use Friendica\Util\Profiler; @@ -36,16 +36,16 @@ class Export extends BaseModule protected $session; /** @var SystemMessages */ protected $sysMessages; - /** @var App */ - protected $app; + /** @var AppHelper */ + protected $appHelper; - public function __construct(App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, SystemMessages $sysMessages, array $server, array $parameters = []) + public function __construct(AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, SystemMessages $sysMessages, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->session = $session; $this->sysMessages = $sysMessages; - $this->app = $app; + $this->appHelper = $appHelper; } protected function rawContent(array $request = []) @@ -55,7 +55,7 @@ class Export extends BaseModule throw new HTTPException\BadRequestException(); } - $owner = Profile::load($this->app, $nickname, false); + $owner = Profile::load($this->appHelper, $nickname, false); if (!$owner || $owner['account_expired'] || $owner['account_removed']) { throw new HTTPException\NotFoundException($this->t('User not found.')); } diff --git a/src/Module/Calendar/Show.php b/src/Module/Calendar/Show.php index 571d0172a1..82f6e55d56 100644 --- a/src/Module/Calendar/Show.php +++ b/src/Module/Calendar/Show.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Calendar; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Content\Feature; use Friendica\Content\Nav; @@ -33,12 +36,12 @@ class Show extends BaseModule protected $session; /** @var SystemMessages */ protected $sysMessages; - /** @var App\Page */ + /** @var Page */ protected $page; - /** @var App */ - protected $app; + /** @var AppHelper */ + protected $appHelper; - public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, SystemMessages $sysMessages, App\Page $page, App $app, array $server, array $parameters = []) + public function __construct(L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, SystemMessages $sysMessages, Page $page, AppHelper $app, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); @@ -55,7 +58,7 @@ class Show extends BaseModule throw new HTTPException\UnauthorizedException(); } - $owner = Profile::load($this->app, $nickname, false); + $owner = Profile::load($this->appHelper, $nickname, false); if (!$owner || $owner['account_expired'] || $owner['account_removed']) { throw new HTTPException\NotFoundException($this->t('User not found.')); } diff --git a/src/Module/Moderation/BaseUsers.php b/src/Module/Moderation/BaseUsers.php index 91c538c123..0123ce5bc8 100644 --- a/src/Module/Moderation/BaseUsers.php +++ b/src/Module/Moderation/BaseUsers.php @@ -7,13 +7,15 @@ namespace Friendica\Module\Moderation; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Core\Hook; use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\Core\Session\Capability\IHandleUserSessions; use Friendica\Database\Database; -use Friendica\DI; use Friendica\Model\Register; use Friendica\Model\User; use Friendica\Module\BaseModeration; @@ -29,9 +31,9 @@ abstract class BaseUsers extends BaseModeration /** @var Database */ protected $database; - public function __construct(Database $database, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(Database $database, Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { - parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($page, $appHelper, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->database = $database; } diff --git a/src/Module/Moderation/Blocklist/Contact.php b/src/Module/Moderation/Blocklist/Contact.php index d19fd74903..02bb451213 100644 --- a/src/Module/Moderation/Blocklist/Contact.php +++ b/src/Module/Moderation/Blocklist/Contact.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Moderation\Blocklist; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Content\Pager; use Friendica\Core\L10n; use Friendica\Core\Renderer; @@ -18,7 +21,6 @@ use Friendica\Model; use Friendica\Module\BaseModeration; use Friendica\Module\Response; use Friendica\Navigation\SystemMessages; -use Friendica\Util\Network; use Friendica\Util\Profiler; use Psr\Log\LoggerInterface; @@ -27,9 +29,9 @@ class Contact extends BaseModeration /** @var Database */ private $database; - public function __construct(Database $database, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(Database $database, Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { - parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($page, $appHelper, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->database = $database; } diff --git a/src/Module/Moderation/Blocklist/Server/Add.php b/src/Module/Moderation/Blocklist/Server/Add.php index f98a3ec716..95f638f088 100644 --- a/src/Module/Moderation/Blocklist/Server/Add.php +++ b/src/Module/Moderation/Blocklist/Server/Add.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Moderation\Blocklist\Server; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Content\ContactSelector; use Friendica\Core\L10n; use Friendica\Core\Renderer; @@ -29,7 +32,7 @@ class Add extends BaseModeration /** @var DomainPatternBlocklist */ private $blocklist; - public function __construct(DomainPatternBlocklist $blocklist, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(DomainPatternBlocklist $blocklist, Page $page, AppHelper $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); diff --git a/src/Module/Moderation/Blocklist/Server/Import.php b/src/Module/Moderation/Blocklist/Server/Import.php index d42101857e..52f2a1ccc1 100644 --- a/src/Module/Moderation/Blocklist/Server/Import.php +++ b/src/Module/Moderation/Blocklist/Server/Import.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Moderation\Blocklist\Server; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\Core\Session\Capability\IHandleUserSessions; @@ -27,9 +30,9 @@ class Import extends \Friendica\Module\BaseModeration /** @var array of blocked server domain patterns */ private $blocklist = []; - public function __construct(DomainPatternBlocklist $localBlocklist, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(DomainPatternBlocklist $localBlocklist, Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { - parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($page, $appHelper, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->localBlocklist = $localBlocklist; } diff --git a/src/Module/Moderation/Blocklist/Server/Index.php b/src/Module/Moderation/Blocklist/Server/Index.php index fd9fbdec87..20d95a218d 100644 --- a/src/Module/Moderation/Blocklist/Server/Index.php +++ b/src/Module/Moderation/Blocklist/Server/Index.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Moderation\Blocklist\Server; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\Core\Session\Capability\IHandleUserSessions; @@ -24,9 +27,9 @@ class Index extends BaseModeration /** @var DomainPatternBlocklist */ private $blocklist; - public function __construct(DomainPatternBlocklist $blocklist, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(DomainPatternBlocklist $blocklist, Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { - parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($page, $appHelper, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->blocklist = $blocklist; } diff --git a/src/Module/Moderation/Item/Source.php b/src/Module/Moderation/Item/Source.php index 80edbe04b9..10f70e5fd4 100644 --- a/src/Module/Moderation/Item/Source.php +++ b/src/Module/Moderation/Item/Source.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Moderation\Item; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; use Friendica\Core\Renderer; @@ -24,9 +27,9 @@ class Source extends BaseModeration /** @var IManageConfigValues */ private $config; - public function __construct(IManageConfigValues $config, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(IManageConfigValues $config, Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { - parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($page, $appHelper, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->config = $config; } diff --git a/src/Module/Moderation/Reports.php b/src/Module/Moderation/Reports.php index 7951dda59b..1b713abb66 100644 --- a/src/Module/Moderation/Reports.php +++ b/src/Module/Moderation/Reports.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Moderation; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Content\Pager; use Friendica\Content\Text\BBCode; use Friendica\Core\L10n; @@ -27,9 +30,9 @@ class Reports extends BaseModeration /** @var Database */ private $database; - public function __construct(Database $database, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(Database $database, Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { - parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($page, $appHelper, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->database = $database; } diff --git a/src/Module/Moderation/Summary.php b/src/Module/Moderation/Summary.php index b9f4144df3..99ab2ee296 100644 --- a/src/Module/Moderation/Summary.php +++ b/src/Module/Moderation/Summary.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Moderation; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\Core\Session\Capability\IHandleUserSessions; @@ -24,9 +27,9 @@ class Summary extends BaseModeration /** @var Database */ private $database; - public function __construct(Database $database, App\Page $page, App $app, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(Database $database, Page $page, AppHelper $appHelper, SystemMessages $systemMessages, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { - parent::__construct($page, $app, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + parent::__construct($page, $appHelper, $systemMessages, $session, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->database = $database; } @@ -34,7 +37,7 @@ class Summary extends BaseModeration protected function content(array $request = []): string { parent::content(); - + $accounts = [ [$this->t('Personal Page'), 0], [$this->t('Organisation Page'), 0], diff --git a/src/Module/Notifications/Ping.php b/src/Module/Notifications/Ping.php index 59836d8f91..8e280ef0cb 100644 --- a/src/Module/Notifications/Ping.php +++ b/src/Module/Notifications/Ping.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Notifications; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Contact\Introduction\Repository\Introduction; use Friendica\Content\GroupManager; @@ -60,10 +62,10 @@ class Ping extends BaseModule private $cache; /** @var Repository\Notify */ private $notify; - /** @var App */ - private $app; + /** @var AppHelper */ + private $appHelper; - public function __construct(App $app, Repository\Notify $notify, ICanCache $cache, Database $database, IManagePersonalConfigValues $pconfig, IManageConfigValues $config, IHandleUserSessions $session, SystemMessages $systemMessages, Repository\Notification $notificationRepo, Introduction $introductionRepo, Factory\FormattedNavNotification $formattedNavNotification, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(AppHelper $appHelper, Repository\Notify $notify, ICanCache $cache, Database $database, IManagePersonalConfigValues $pconfig, IManageConfigValues $config, IHandleUserSessions $session, SystemMessages $systemMessages, Repository\Notification $notificationRepo, Introduction $introductionRepo, Factory\FormattedNavNotification $formattedNavNotification, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); @@ -77,7 +79,7 @@ class Ping extends BaseModule $this->database = $database; $this->cache = $cache; $this->notify = $notify; - $this->app = $app; + $this->appHelper = $appHelper; } protected function rawContent(array $request = []) diff --git a/src/Module/Post/Edit.php b/src/Module/Post/Edit.php index f07639a18a..c07ba9d78f 100644 --- a/src/Module/Post/Edit.php +++ b/src/Module/Post/Edit.php @@ -8,6 +8,11 @@ namespace Friendica\Module\Post; use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Mode; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Content\Feature; use Friendica\Core\Hook; @@ -37,12 +42,12 @@ class Edit extends BaseModule protected $page; /** @var App\Mode */ protected $mode; - /** @var App */ - protected $app; + /** @var AppHelper */ + protected $appHelper; /** @var bool */ protected $isModal = false; - public function __construct(L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, SystemMessages $sysMessages, App\Page $page, App\Mode $mode, App $app, array $server, array $parameters = []) + public function __construct(L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, IHandleUserSessions $session, SystemMessages $sysMessages, Page $page, Mode $mode, AppHelper $appHelper, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); @@ -50,7 +55,7 @@ class Edit extends BaseModule $this->sysMessages = $sysMessages; $this->page = $page; $this->mode = $mode; - $this->app = $app; + $this->appHelper = $appHelper; } diff --git a/src/Module/Profile/Common.php b/src/Module/Profile/Common.php index 539b132c1e..ccd94844a2 100644 --- a/src/Module/Profile/Common.php +++ b/src/Module/Profile/Common.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Profile; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Content\Nav; use Friendica\Content\Pager; use Friendica\Core\Config\Capability\IManageConfigValues; @@ -30,16 +32,16 @@ class Common extends BaseProfile private $config; /** @var IHandleUserSessions */ private $userSession; - /** @var App */ - private $app; + /** @var AppHelper */ + private $appHelper; - public function __construct(App $app, IHandleUserSessions $userSession, IManageConfigValues $config, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(AppHelper $appHelper, IHandleUserSessions $userSession, IManageConfigValues $config, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->config = $config; $this->userSession = $userSession; - $this->app = $app; + $this->appHelper = $appHelper; } protected function content(array $request = []): string @@ -52,7 +54,7 @@ class Common extends BaseProfile $nickname = $this->parameters['nickname']; - $profile = Profile::load($this->app, $nickname); + $profile = Profile::load($this->appHelper, $nickname); if (empty($profile)) { throw new HTTPException\NotFoundException($this->t('User not found.')); } diff --git a/src/Module/Profile/Contacts.php b/src/Module/Profile/Contacts.php index 09bac2cee6..634a9f6bd8 100644 --- a/src/Module/Profile/Contacts.php +++ b/src/Module/Profile/Contacts.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Profile; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\Content\Nav; use Friendica\Content\Pager; use Friendica\Core\Config\Capability\IManageConfigValues; @@ -29,18 +31,18 @@ class Contacts extends Module\BaseProfile private $config; /** @var IHandleUserSessions */ private $userSession; - /** @var App */ - private $app; + /** @var AppHelper */ + private $appHelper; /** @var Database */ private $database; - public function __construct(Database $database, App $app, IHandleUserSessions $userSession, IManageConfigValues $config, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(Database $database, AppHelper $appHelper, IHandleUserSessions $userSession, IManageConfigValues $config, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->config = $config; $this->userSession = $userSession; - $this->app = $app; + $this->appHelper = $appHelper; $this->database = $database; } @@ -53,7 +55,7 @@ class Contacts extends Module\BaseProfile $nickname = $this->parameters['nickname']; $type = $this->parameters['type'] ?? 'all'; - $profile = Model\Profile::load($this->app, $nickname); + $profile = Model\Profile::load($this->appHelper, $nickname); if (empty($profile)) { throw new HTTPException\NotFoundException($this->t('User not found.')); } diff --git a/src/Module/Profile/Index.php b/src/Module/Profile/Index.php index 5558c87999..189153c6fb 100644 --- a/src/Module/Profile/Index.php +++ b/src/Module/Profile/Index.php @@ -7,7 +7,11 @@ namespace Friendica\Module\Profile; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Mode; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Content\Conversation; use Friendica\Core\Config\Capability\IManageConfigValues; @@ -34,13 +38,13 @@ class Index extends BaseModule { /** @var Database */ private $database; - /** @var App */ - private $app; + /** @var AppHelper */ + protected $appHelper; /** @var IHandleUserSessions */ private $session; /** @var IManageConfigValues */ private $config; - /** @var App\Page */ + /** @var Page */ private $page; /** @var ProfileField */ private $profileField; @@ -50,10 +54,10 @@ class Index extends BaseModule private $conversation; /** @var IManagePersonalConfigValues */ private $pConfig; - /** @var App\Mode */ + /** @var Mode */ private $mode; - public function __construct(App\Mode $mode, IManagePersonalConfigValues $pConfig, Conversation $conversation, DateTimeFormat $dateTimeFormat, ProfileField $profileField, App\Page $page, IManageConfigValues $config, IHandleUserSessions $session, App $app, Database $database, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(Mode $mode, IManagePersonalConfigValues $pConfig, Conversation $conversation, DateTimeFormat $dateTimeFormat, ProfileField $profileField, Page $page, IManageConfigValues $config, IHandleUserSessions $session, AppHelper $app, Database $database, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); @@ -71,11 +75,11 @@ class Index extends BaseModule protected function rawContent(array $request = []) { - (new Profile($this->profileField, $this->page, $this->config, $this->session, $this->app, $this->database, $this->l10n, $this->baseUrl, $this->args, $this->logger, $this->profiler, $this->response, $this->server, $this->parameters))->rawContent(); + (new Profile($this->profileField, $this->page, $this->config, $this->session, $this->appHelper, $this->database, $this->l10n, $this->baseUrl, $this->args, $this->logger, $this->profiler, $this->response, $this->server, $this->parameters))->rawContent(); } protected function content(array $request = []): string { - return (new Conversations($this->mode, $this->pConfig, $this->conversation, $this->session, $this->config, $this->dateTimeFormat, $this->page, $this->app, $this->l10n, $this->baseUrl, $this->args, $this->logger, $this->profiler, $this->response, $this->server, $this->parameters))->content(); + return (new Conversations($this->mode, $this->pConfig, $this->conversation, $this->session, $this->config, $this->dateTimeFormat, $this->page, $this->appHelper, $this->l10n, $this->baseUrl, $this->args, $this->logger, $this->profiler, $this->response, $this->server, $this->parameters))->content(); } } diff --git a/src/Module/Profile/Photos.php b/src/Module/Profile/Photos.php index fb89ac676d..8620be736b 100644 --- a/src/Module/Profile/Photos.php +++ b/src/Module/Profile/Photos.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Profile; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Content\Feature; use Friendica\Content\Pager; use Friendica\Core\Config\Capability\IManageConfigValues; @@ -37,12 +40,12 @@ class Photos extends \Friendica\Module\BaseProfile { /** @var IHandleUserSessions */ private $session; - /** @var App\Page */ + /** @var Page */ private $page; /** @var IManageConfigValues */ private $config; - /** @var App */ - private $app; + /** @var AppHelper */ + protected $appHelper; /** @var Database */ private $database; /** @var SystemMessages */ @@ -52,19 +55,19 @@ class Photos extends \Friendica\Module\BaseProfile /** @var array owner-view record */ private $owner; - public function __construct(ACLFormatter $aclFormatter, SystemMessages $systemMessages, Database $database, App $app, IManageConfigValues $config, App\Page $page, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(ACLFormatter $aclFormatter, SystemMessages $systemMessages, Database $database, AppHelper $appHelper, IManageConfigValues $config, Page $page, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->session = $session; $this->page = $page; $this->config = $config; - $this->app = $app; + $this->appHelper = $appHelper; $this->database = $database; $this->systemMessages = $systemMessages; $this->aclFormatter = $aclFormatter; - $owner = Profile::load($this->app, $this->parameters['nickname'] ?? '', false); + $owner = Profile::load($this->appHelper, $this->parameters['nickname'] ?? '', false); if (!$owner || $owner['account_removed'] || $owner['account_expired']) { throw new HTTPException\NotFoundException($this->t('User not found.')); } diff --git a/src/Module/Profile/Profile.php b/src/Module/Profile/Profile.php index 5df1afc3c0..c0b27f49e5 100644 --- a/src/Module/Profile/Profile.php +++ b/src/Module/Profile/Profile.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Profile; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Content\Feature; use Friendica\Content\GroupManager; use Friendica\Content\Nav; @@ -43,23 +46,23 @@ class Profile extends BaseProfile { /** @var Database */ private $database; - /** @var App */ - private $app; + /** @var AppHelper */ + protected $appHelper; /** @var IHandleUserSessions */ private $session; /** @var IManageConfigValues */ private $config; - /** @var App\Page */ + /** @var Page */ private $page; /** @var ProfileField */ private $profileField; - public function __construct(ProfileField $profileField, App\Page $page, IManageConfigValues $config, IHandleUserSessions $session, App $app, Database $database, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(ProfileField $profileField, Page $page, IManageConfigValues $config, IHandleUserSessions $session, AppHelper $appHelper, Database $database, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->database = $database; - $this->app = $app; + $this->appHelper = $appHelper; $this->session = $session; $this->config = $config; $this->page = $page; @@ -95,7 +98,7 @@ class Profile extends BaseProfile protected function content(array $request = []): string { - $profile = ProfileModel::load($this->app, $this->parameters['nickname'] ?? ''); + $profile = ProfileModel::load($this->appHelper, $this->parameters['nickname'] ?? ''); if (!$profile) { throw new HTTPException\NotFoundException($this->t('Profile not found.')); } @@ -374,10 +377,10 @@ class Profile extends BaseProfile /** * Clean the provided input to prevent XSS problems - * @param int $uri_id - * @param string $input - * @return string - * @throws InternalServerErrorException + * @param int $uri_id + * @param string $input + * @return string + * @throws InternalServerErrorException */ private function cleanInput(int $uri_id, string $input): string { diff --git a/src/Module/Profile/Restricted.php b/src/Module/Profile/Restricted.php index 2fa55f3c98..13de7b3c14 100644 --- a/src/Module/Profile/Restricted.php +++ b/src/Module/Profile/Restricted.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Profile; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Core\L10n; use Friendica\Core\Renderer; @@ -19,19 +21,19 @@ use Psr\Log\LoggerInterface; class Restricted extends BaseModule { - /** @var App */ - private $app; + /** @var AppHelper */ + private $appHelper; - public function __construct(App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->app = $app; + $this->appHelper = $appHelper; } protected function content(array $request = []): string { - $profile = Profile::load($this->app, $this->parameters['nickname'] ?? '', false); + $profile = Profile::load($this->appHelper, $this->parameters['nickname'] ?? '', false); if (!$profile) { throw new HTTPException\NotFoundException($this->t('Profile not found.')); } diff --git a/src/Module/Security/TwoFactor/Recovery.php b/src/Module/Security/TwoFactor/Recovery.php index e557068001..e93b446f1b 100644 --- a/src/Module/Security/TwoFactor/Recovery.php +++ b/src/Module/Security/TwoFactor/Recovery.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Security\TwoFactor; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Core\L10n; use Friendica\Core\Renderer; @@ -29,18 +31,18 @@ class Recovery extends BaseModule { /** @var IHandleUserSessions */ protected $session; - /** @var App */ - protected $app; + /** @var AppHelper */ + protected $appHelper; /** @var Authentication */ protected $auth; - public function __construct(App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, Authentication $auth, IHandleUserSessions $session, array $server, array $parameters = []) + public function __construct(AppHelper $appHelper, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, Authentication $auth, IHandleUserSessions $session, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->app = $app; - $this->auth = $auth; - $this->session = $session; + $this->appHelper = $appHelper; + $this->auth = $auth; + $this->session = $session; } protected function post(array $request = []) diff --git a/src/Module/Security/TwoFactor/Trust.php b/src/Module/Security/TwoFactor/Trust.php index 153a615a5e..5620cb9b94 100644 --- a/src/Module/Security/TwoFactor/Trust.php +++ b/src/Module/Security/TwoFactor/Trust.php @@ -7,7 +7,9 @@ namespace Friendica\Module\Security\TwoFactor; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Core\L10n; use Friendica\Core\Renderer; @@ -33,8 +35,8 @@ use Psr\Log\LoggerInterface; */ class Trust extends BaseModule { - /** @var App */ - protected $app; + /** @var AppHelper */ + protected $appHelper; /** @var Authentication */ protected $auth; /** @var IHandleUserSessions */ @@ -46,11 +48,11 @@ class Trust extends BaseModule /** @var TwoFactor\Repository\TrustedBrowser */ protected $trustedBrowserRepository; - public function __construct(App $app, Authentication $auth, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, IHandleUserSessions $session, Cookie $cookie, TwoFactor\Factory\TrustedBrowser $trustedBrowserFactory, TwoFactor\Repository\TrustedBrowser $trustedBrowserRepository, Response $response, array $server, array $parameters = []) + public function __construct(AppHelper $appHelper, Authentication $auth, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, IHandleUserSessions $session, Cookie $cookie, TwoFactor\Factory\TrustedBrowser $trustedBrowserFactory, TwoFactor\Repository\TrustedBrowser $trustedBrowserRepository, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->app = $app; + $this->appHelper = $appHelper; $this->auth = $auth; $this->session = $session; $this->cookie = $cookie; diff --git a/src/Module/Settings/Display.php b/src/Module/Settings/Display.php index fd62230442..1c70813401 100644 --- a/src/Module/Settings/Display.php +++ b/src/Module/Settings/Display.php @@ -7,7 +7,10 @@ namespace Friendica\Module\Settings; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Page; +use Friendica\AppHelper; use Friendica\Content\Conversation\Collection\Timelines; use Friendica\Content\Text\BBCode; use Friendica\Content\Conversation\Factory\Channel as ChannelFactory; @@ -39,8 +42,8 @@ class Display extends BaseSettings private $config; /** @var IManagePersonalConfigValues */ private $pConfig; - /** @var App */ - private $app; + /** @var AppHelper */ + private $appHelper; /** @var SystemMessages */ private $systemMessages; /** @var ChannelFactory */ @@ -54,13 +57,13 @@ class Display extends BaseSettings /** @var TimelineFactory */ protected $timeline; - public function __construct(Repository\UserDefinedChannel $userDefinedChannel, NetworkFactory $network, CommunityFactory $community, ChannelFactory $channel, TimelineFactory $timeline, SystemMessages $systemMessages, App $app, IManagePersonalConfigValues $pConfig, IManageConfigValues $config, IHandleUserSessions $session, App\Page $page, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(Repository\UserDefinedChannel $userDefinedChannel, NetworkFactory $network, CommunityFactory $community, ChannelFactory $channel, TimelineFactory $timeline, SystemMessages $systemMessages, AppHelper $appHelper, IManagePersonalConfigValues $pConfig, IManageConfigValues $config, IHandleUserSessions $session, Page $page, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($session, $page, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); $this->config = $config; $this->pConfig = $pConfig; - $this->app = $app; + $this->appHelper = $appHelper; $this->systemMessages = $systemMessages; $this->timeline = $timeline; $this->channel = $channel; @@ -160,7 +163,7 @@ class Display extends BaseSettings // call theme_post only if theme has not been changed if ($themeconfigfile = Theme::getConfigFile($theme)) { require_once $themeconfigfile; - theme_post($this->app); + theme_post($this->appHelper); } } else { User::update(['theme' => $theme], $uid); @@ -286,7 +289,7 @@ class Display extends BaseSettings $theme_config = ''; if ($themeconfigfile = Theme::getConfigFile($theme_selected)) { require_once $themeconfigfile; - $theme_config = theme_content($this->app); + $theme_config = theme_content($this->appHelper); } $tpl = Renderer::getMarkupTemplate('settings/display.tpl'); diff --git a/src/Module/User/Delegation.php b/src/Module/User/Delegation.php index 71c5c60644..2c13891348 100644 --- a/src/Module/User/Delegation.php +++ b/src/Module/User/Delegation.php @@ -7,7 +7,9 @@ namespace Friendica\Module\User; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Contact\Introduction\Repository\Introduction; use Friendica\Core\Hook; @@ -42,10 +44,10 @@ class Delegation extends BaseModule private $notify; /** @var Introduction */ private $intro; - /** @var App */ - private $app; + /** @var AppHelper */ + private $appHelper; - public function __construct(App $app, Introduction $intro, Notify $notify, SystemMessages $systemMessages, Authentication $auth, Database $db, IHandleUserSessions $session, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Util\Profiler $profiler, Response $response, array $server, array $parameters = []) + public function __construct(AppHelper $appHelper, Introduction $intro, Notify $notify, SystemMessages $systemMessages, Authentication $auth, Database $db, IHandleUserSessions $session, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Util\Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); @@ -55,7 +57,7 @@ class Delegation extends BaseModule $this->systemMessages = $systemMessages; $this->notify = $notify; $this->intro = $intro; - $this->app = $app; + $this->appHelper = $appHelper; } protected function post(array $request = [])