24 lines
479 B
PHP
24 lines
479 B
PHP
<?php
|
|
|
|
class Controller {
|
|
|
|
public function loadPage() {
|
|
$app = Config::get('app:App:default_app');
|
|
|
|
require_once 'app/'. $app .'/controllers/Index.class.php';
|
|
$c = new IndexController();
|
|
$data = $c->_index();
|
|
|
|
$v = new View();
|
|
$v->setTemplate('app/'. $app .'/templates/main.php');
|
|
$v->setView('app/'. $app .'/views/Index_index.php');
|
|
$v->setData($data);
|
|
|
|
$html = $v->render();
|
|
|
|
header('Content-Type: text/html; charset=utf-8');
|
|
echo $html;
|
|
}
|
|
}
|
|
|
|
?>
|