config, [
"autoclose_session" => $this->AUTOCLOSE_SESSION(),
]);
}
function isAutocloseSession(): bool { return $this->config["autoclose_session"]; }
protected function overridePrint(IPage $page): void {
if ($this->isAutocloseSession()) session::close();
if ($page instanceof IBasicPage) {
if ($page->haveContent()) {
$this->doResolveConfig();
$this->haveOutput = true;
$this->printStartHtml();
$this->printStartHead();
$this->printCss();
$this->printJs();
$this->printScript();
$this->printHeadTitle();
$this->printEndHead();
$this->printStartBody();
$this->printContent();
$this->printEndBody();
$this->printEndHtml();
}
} else {
# si ce n'est pas une instance de IBasicPage, l'imprimer tel quel
if ($page->haveContent()) {
$this->haveOutput = true;
co::_write([$this->page]);
}
}
}
function printStartHtml(): void {
$page = $this->page;
$page->beforePrintStartHtml();
parent::printStartHtml();
$page->afterPrintStartHtml();
}
function printStartHead(): void {
$page = $this->page;
$page->beforePrintStartHead();
parent::printStartHead();
$page->afterPrintStartHead();
}
function printCss(): void {
$page = $this->page;
$page->beforePrintCssLinks();
parent::printCssLinks();
$page->afterPrintCssLinks();
$page->beforePrintCss();
parent::printCss();
# $page est une instance de IPlugin et est traitée dans la méthode précédente
#$page->printCss();
$page->afterPrintCss();
}
function printJs(): void {
$page = $this->page;
$page->beforePrintJsLinks();
parent::printJsLinks();
$page->afterPrintJsLinks();
$page->beforePrintJs();
parent::printJs();
# $page est une instance de IPlugin et est traitée dans la méthode précédente
#$page->printJs();
$page->afterPrintJs();
}
function printScript(): void {
$page = $this->page;
$page->beforePrintScript();
$this->resolvePluginsScripts();
# $page est une instance de IPlugin et est traitée dans la méthode précédente
# cf Html5VanillaPageContainer#overrideSetup()
#$this->beforeCapture();
#$page->printScript();
#$this->captureScript();
#$this->beforeCapture();
#$page->printJquery();
#$this->captureJquery();
$this->printMergedScripts();
$page->afterPrintScript();
}
function printHeadTitle(): void {
$page = $this->page;
$page->beforePrintHeadTitle();
$page->printHeadTitle();
$page->afterPrintHeadTitle();
}
function printEndHead(): void {
$page = $this->page;
$page->beforePrintEndHead();
parent::printEndHead();
$page->afterPrintEndHead();
}
function printStartBody(): void {
$page = $this->page;
$page->beforePrintStartBody();
parent::printStartBody();
$page->afterPrintStartBody();
}
function printContent(): void {
$page = $this->page;
$page->beforePrintContent();
$page->printContent();
# s'assurer que le layout est correctement fermé
ly::end();
$page->afterPrintContent();
}
function printEndBody(): void {
$page = $this->page;
$page->beforePrintEndBody();
parent::printEndBody();
$page->afterPrintEndBody();
}
function printEndHtml(): void {
$page = $this->page;
$page->beforePrintEndHtml();
parent::printEndHtml();
$page->afterPrintEndHtml();
}
}