mirror of
https://github.com/friendica/friendica
synced 2025-04-22 07:50:11 +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
|
@ -13,6 +13,7 @@ use Friendica\Core\Hook;
|
|||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Register;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
|
@ -25,7 +26,7 @@ class Login extends BaseModule
|
|||
{
|
||||
public static function content(array $parameters = [])
|
||||
{
|
||||
$a = self::getApp();
|
||||
$a = DI::app();
|
||||
|
||||
if (local_user()) {
|
||||
$a->internalRedirect();
|
||||
|
@ -57,7 +58,7 @@ class Login extends BaseModule
|
|||
/** @var Authentication $authentication */
|
||||
$authentication = self::getClass(Authentication::class);
|
||||
$authentication->withPassword(
|
||||
self::getApp(),
|
||||
DI::app(),
|
||||
trim($_POST['username']),
|
||||
trim($_POST['password']),
|
||||
!empty($_POST['remember'])
|
||||
|
@ -81,7 +82,7 @@ class Login extends BaseModule
|
|||
*/
|
||||
public static function form($return_path = null, $register = false, $hiddens = [])
|
||||
{
|
||||
$a = self::getApp();
|
||||
$a = DI::app();
|
||||
$o = '';
|
||||
|
||||
$noid = Config::get('system', 'no_openid');
|
||||
|
@ -133,7 +134,7 @@ class Login extends BaseModule
|
|||
$o .= Renderer::replaceMacros(
|
||||
$tpl,
|
||||
[
|
||||
'$dest_url' => self::getApp()->getBaseURL(true) . '/login',
|
||||
'$dest_url' => DI::app()->getBaseURL(true) . '/login',
|
||||
'$logout' => L10n::t('Logout'),
|
||||
'$login' => L10n::t('Login'),
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue