X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FBaseModule.php;h=5d752bb4f7450065bec2642c8f997fa8f067c91c;hb=ce578a77453fd421e9598c994ef008ad7e128de6;hp=b9db1953e5a3c6ef1c0550969383c4fb7245b73c;hpb=714f0febc4918f5569eb09f8800b6739cff36347;p=friendica.git diff --git a/src/BaseModule.php b/src/BaseModule.php index b9db1953e5..5d752bb4f7 100644 --- a/src/BaseModule.php +++ b/src/BaseModule.php @@ -22,6 +22,7 @@ namespace Friendica; use Friendica\Capabilities\ICanHandleRequests; +use Friendica\Core\L10n; use Friendica\Core\Logger; use Friendica\Model\User; @@ -37,24 +38,21 @@ use Friendica\Model\User; abstract class BaseModule implements ICanHandleRequests { /** @var array */ - protected static $parameters = []; + protected $parameters = []; - public function __construct(array $parameters = []) - { - static::$parameters = $parameters; - } + /** @var L10n */ + protected $l10n; - /** - * {@inheritDoc} - */ - public static function init() + public function __construct(L10n $l10n, array $parameters = []) { + $this->parameters = $parameters; + $this->l10n = $l10n; } /** * {@inheritDoc} */ - public static function rawContent() + public function rawContent() { // echo ''; // exit; @@ -63,7 +61,7 @@ abstract class BaseModule implements ICanHandleRequests /** * {@inheritDoc} */ - public static function content() + public function content(): string { return ''; } @@ -71,21 +69,21 @@ abstract class BaseModule implements ICanHandleRequests /** * {@inheritDoc} */ - public static function delete() + public function delete() { } /** * {@inheritDoc} */ - public static function patch() + public function patch() { } /** * {@inheritDoc} */ - public static function post() + public function post() { // DI::baseurl()->redirect('module'); } @@ -93,19 +91,12 @@ abstract class BaseModule implements ICanHandleRequests /** * {@inheritDoc} */ - public static function afterpost() - { - } - - /** - * {@inheritDoc} - */ - public static function put() + public function put() { } /** Gets the name of the current class */ - public static function getClassName(): string + public function getClassName(): string { return static::class; }