|
|
|
@ -9,6 +9,9 @@ declare(strict_types = 1); |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
namespace Project\controllers\app; |
|
|
|
namespace Project\controllers\app; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use CodeHydrater\enums\view_type as ViewType; |
|
|
|
|
|
|
|
use CodeHydrater\bootstrap\registry as Reg; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Description of home_ctrl |
|
|
|
* Description of home_ctrl |
|
|
|
* |
|
|
|
* |
|
|
|
@ -19,17 +22,28 @@ class home_ctrl { |
|
|
|
public function index() { |
|
|
|
public function index() { |
|
|
|
$html = new \CodeHydrater\html_document(); |
|
|
|
$html = new \CodeHydrater\html_document(); |
|
|
|
$html->set_author("Robert Strutts, plus ME!"); |
|
|
|
$html->set_author("Robert Strutts, plus ME!"); |
|
|
|
|
|
|
|
|
|
|
|
$view = new \CodeHydrater\view(); |
|
|
|
$view = new \CodeHydrater\view(); |
|
|
|
$view->set('html', $html); |
|
|
|
$view->set('html', $html); |
|
|
|
$view->set_template('main'); |
|
|
|
$view->set_template('main'); |
|
|
|
$view->include("app/header"); |
|
|
|
$view->include("app/header", ViewType::PHP); |
|
|
|
$view->include("app/footer"); |
|
|
|
$view->include("app/footer", ViewType::PHP); |
|
|
|
$view->render($this, "app/home_index"); |
|
|
|
$view->render($this, "app/home_index", ViewType::PHP); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function name_demo() { |
|
|
|
public function name_demo() { |
|
|
|
echo "OLD DEMO Page...!"; |
|
|
|
$view = new \CodeHydrater\view(); |
|
|
|
|
|
|
|
$view->set('twig_data', ['name' => "John Doe"]); |
|
|
|
|
|
|
|
$view->render($this, "app/test", ViewType::TWIG); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function liquid() { |
|
|
|
|
|
|
|
$view = new \CodeHydrater\view(); |
|
|
|
|
|
|
|
$view->set('template_assigns', [ |
|
|
|
|
|
|
|
'name' => "James Smith", |
|
|
|
|
|
|
|
'date' => date('Y-m-d') |
|
|
|
|
|
|
|
]); |
|
|
|
|
|
|
|
$view->render($this, "app/liquid", ViewType::LIQUID); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function extra() { |
|
|
|
public function extra() { |
|
|
|
|