initialiser nulib/config aussi

This commit is contained in:
Jephté Clain 2025-11-13 09:55:45 +04:00
parent b99cb3a112
commit b9df5da464
2 changed files with 7 additions and 0 deletions

View File

@ -20,6 +20,7 @@ use nur\v\page;
use nur\v\prefix;
use nur\v\vo;
use Throwable;
use nulib\app\config as nconfig;
abstract class AbstractPageContainer implements IPageContainer {
protected static function ensure_preparec(IComponent $c, bool $afterPrepare=false): bool {
@ -265,6 +266,7 @@ abstract class AbstractPageContainer implements IPageContainer {
$page->afterConfig();
}
config::configure($this->config["configure_options"]);
nconfig::configure($this->config["configure_options"]);
$this->phase = self::SETUP_PHASE;
if (self::ensure_setupc($page, false, $output)) {

View File

@ -1,11 +1,13 @@
<?php
namespace nur\v;
use nulib\app\app;
use nur\A;
use nur\config;
use nur\v\html5\Html5NavigablePageContainer;
use nur\v\model\IPage;
use nur\v\model\IPageContainer;
use nulib\app\config as nconfig;
class page {
const CONTAINER_CLASS = Html5NavigablePageContainer::class;
@ -36,11 +38,14 @@ class page {
}
static final function render(?IPage $page=null): void {
app::set_fact(app::FACT_WEB_APP);
config::set_fact(config::FACT_WEB_APP);
config::configure(config::CONFIGURE_INITIAL_ONLY);
nconfig::configure(nconfig::CONFIGURE_INITIAL_ONLY);
$pc = self::container();
if ($page === null) {
config::configure(config::CONFIGURE_ROUTES_ONLY);
nconfig::configure(nconfig::CONFIGURE_ROUTES_ONLY);
$page = route::get_page();
}
$pc->setPage($page);