mirror of
https://github.com/friendica/friendica
synced 2025-04-25 15: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
|
@ -7,6 +7,7 @@ namespace Friendica\Core;
|
|||
|
||||
use Exception;
|
||||
use Friendica\BaseObject;
|
||||
use Friendica\DI;
|
||||
use Friendica\Render\FriendicaSmarty;
|
||||
use Friendica\Render\ITemplateEngine;
|
||||
|
||||
|
@ -61,7 +62,7 @@ class Renderer extends BaseObject
|
|||
public static function replaceMacros($s, array $vars = [])
|
||||
{
|
||||
$stamp1 = microtime(true);
|
||||
$a = self::getApp();
|
||||
$a = DI::app();
|
||||
|
||||
// pass $baseurl to all templates if it isn't set
|
||||
$vars = array_merge(['$baseurl' => $a->getBaseURL()], $vars);
|
||||
|
@ -92,7 +93,7 @@ class Renderer extends BaseObject
|
|||
public static function getMarkupTemplate($s, $root = '')
|
||||
{
|
||||
$stamp1 = microtime(true);
|
||||
$a = self::getApp();
|
||||
$a = DI::app();
|
||||
$t = self::getTemplateEngine();
|
||||
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue