mirror of
https://github.com/friendica/friendica
synced 2025-04-27 07: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
|
@ -5,6 +5,7 @@ namespace Friendica\Module\Debug;
|
|||
use Friendica\BaseModule;
|
||||
use Friendica\Core\Installer;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\DI;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Temporal;
|
||||
|
||||
|
@ -17,13 +18,13 @@ class Localtime extends BaseModule
|
|||
$bd_format = L10n::t('l F d, Y \@ g:i A');
|
||||
|
||||
if (!empty($_POST['timezone'])) {
|
||||
self::getApp()->data['mod-localtime'] = DateTimeFormat::convert($time, $_POST['timezone'], 'UTC', $bd_format);
|
||||
DI::app()->data['mod-localtime'] = DateTimeFormat::convert($time, $_POST['timezone'], 'UTC', $bd_format);
|
||||
}
|
||||
}
|
||||
|
||||
public static function content(array $parameters = [])
|
||||
{
|
||||
$app = self::getApp();
|
||||
$app = DI::app();
|
||||
|
||||
$time = ($_REQUEST['time'] ?? '') ?: 'now';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue