- added ADMIN index file

- cleanup config
- added Asset Controller
This commit is contained in:
Maurice Grönwoldt 2020-05-31 17:00:05 +02:00
commit fe7bacd2f6
14 changed files with 300 additions and 33 deletions

View file

@ -4,6 +4,7 @@
namespace Venom\Views;
use Venom\ArgumentHandler;
use Venom\Config;
use Venom\Venom;
@ -24,10 +25,16 @@ class VenomRenderer
public function render(): void
{
$isAsync = false;
if ($this->controller) {
ob_start();
$this->controller->render($this);
$this->templateData = ob_get_clean();
$isAsync = $this->controller->getTemplate() === 'async';
}
if ($isAsync || ArgumentHandler::get()->getItem('async', 'false') === 'true') {
echo $this->templateData;
exit;
}
$this->loadBasicTemplate();
}