mirror of
https://github.com/friendica/friendica
synced 2025-04-19 13:50:15 +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,12 +5,13 @@ namespace Friendica\Module;
|
|||
use Friendica\BaseModule;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\DI;
|
||||
|
||||
class Statistics extends BaseModule
|
||||
{
|
||||
public static function init(array $parameters = [])
|
||||
{
|
||||
$config = self::getApp()->getConfig();
|
||||
$config = DI::app()->getConfig();
|
||||
|
||||
if (!$config->get("system", "nodeinfo")) {
|
||||
throw new \Friendica\Network\HTTPException\NotFoundException();
|
||||
|
@ -19,8 +20,8 @@ class Statistics extends BaseModule
|
|||
|
||||
public static function rawContent(array $parameters = [])
|
||||
{
|
||||
$config = self::getApp()->getConfig();
|
||||
$logger = self::getApp()->getLogger();
|
||||
$config = DI::app()->getConfig();
|
||||
$logger = DI::app()->getLogger();
|
||||
|
||||
$registration_open =
|
||||
intval($config->get('config', 'register_policy')) !== Register::CLOSED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue