Add ViewHelper in view for injecting some basic classes in views
This commit is contained in:
@ -14,6 +14,7 @@ use Ardent\Undercurrent\Http\RouterInterface;
|
||||
use Ardent\Undercurrent\Http\StatusEnum;
|
||||
use Ardent\Undercurrent\Logger\LogContainer;
|
||||
use Ardent\Undercurrent\Logger\LoggerInterface;
|
||||
use Ardent\Undercurrent\View\ViewHelper;
|
||||
use Ardent\Undercurrent\View\ViewInterface;
|
||||
|
||||
class BaseKernel
|
||||
@ -26,7 +27,7 @@ class BaseKernel
|
||||
|
||||
public function run(): void
|
||||
{
|
||||
$appConfig = new AppConfig($this->rootDirectory);
|
||||
$appConfig = new AppConfig($this->rootDirectory, '/Template');
|
||||
|
||||
$container = (new GenericContainer());
|
||||
$container
|
||||
@ -36,6 +37,7 @@ class BaseKernel
|
||||
->add(GenericContainer::class, fn($container) => $container)
|
||||
->add(AppConfig::class, fn() => $appConfig)
|
||||
->add(GenericRouter::class)
|
||||
->add(ViewHelper::class)
|
||||
->add(LogContainer::class);
|
||||
|
||||
$this->dependencies($container);
|
||||
|
Reference in New Issue
Block a user