- WIP on RAW token
- WIP on caching interface - Work done on easing template rendering for the controller
This commit is contained in:
1 parent
f8e3dbd60f
commit
bcd49884fc
37 files changed
+381
-107
No files matched your search
@@ -10,12 +10,12 @@ class %CLASSNAME% %EXTENDS% {
|
||||
|
||||
protected array $__variables_list = [];
|
||||
|
||||
public function output() : void
|
||||
public final function __output() : void
|
||||
{
|
||||
extract($this->__variables_list); ?>%CONTENT%<?php
|
||||
}
|
||||
|
||||
public function __renderSection($name) : void
|
||||
public final function __renderSection($name) : void
|
||||
{
|
||||
foreach([ 'prepend', 'default', 'append' ] as $item) {
|
||||
usort($this->__section_list[$name][$item], fn($a, $b) => $a['order'] <=> $b['order']);
|
||||
@@ -30,9 +30,9 @@ class %CLASSNAME% %EXTENDS% {
|
||||
}
|
||||
}
|
||||
|
||||
public function __renderTemplate() {
|
||||
public final function __invoke() {
|
||||
ob_start();
|
||||
$this->output();
|
||||
$this->__output();
|
||||
return ob_get_clean();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user