Introduce new DI container
- Adding Friendica\DI class for getting dynamic classes - Replacing BaseObject::getApp() with this class
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace Friendica\Module\Filer;
|
||||
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\FileTag;
|
||||
use Friendica\Network\HTTPException;
|
||||
use Friendica\Util\XML;
|
||||
@@ -18,7 +19,7 @@ class RemoveTag extends BaseModule
|
||||
throw new HTTPException\ForbiddenException();
|
||||
}
|
||||
|
||||
$app = self::getApp();
|
||||
$app = DI::app();
|
||||
$logger = $app->getLogger();
|
||||
|
||||
$item_id = (($app->argc > 1) ? intval($app->argv[1]) : 0);
|
||||
|
||||
@@ -6,6 +6,7 @@ use Friendica\BaseModule;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model;
|
||||
use Friendica\Util\XML;
|
||||
|
||||
@@ -18,13 +19,13 @@ class SaveTag extends BaseModule
|
||||
{
|
||||
if (!local_user()) {
|
||||
info(L10n::t('You must be logged in to use this module'));
|
||||
self::getApp()->internalRedirect();
|
||||
DI::app()->internalRedirect();
|
||||
}
|
||||
}
|
||||
|
||||
public static function rawContent(array $parameters = [])
|
||||
{
|
||||
$a = self::getApp();
|
||||
$a = DI::app();
|
||||
$logger = $a->getLogger();
|
||||
|
||||
$term = XML::unescape(trim($_GET['term'] ?? ''));
|
||||
|
||||
Reference in New Issue
Block a user