mirror of
https://github.com/friendica/friendica
synced 2025-04-26 19:50:10 +00:00
Introduce new DI container
- Adding Friendica\DI class for getting dynamic classes - Replacing BaseObject::getApp() with this class
This commit is contained in:
parent
a9220aa83b
commit
1de3f186d7
132 changed files with 377 additions and 270 deletions
|
@ -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'] ?? ''));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue