class Controller_Public extends Controller { }
<?php class Controller_Home extends Controller_Template { public $template = 'layout/index'; public function __construct(\Request $request, \Response $response) { parent::__construct($request, $response); } public function action_index() { $data['title'] = 'Peter'; $this->template->content = View::factory(Request::active()->controller.'/'.Request::active()->action, $data); } }
<?php class Controller_Public extends Controller_Template { public $template = 'layout/index'; public function before() { parent::before(); $this->template->content = View::factory(Request::active()->controller.'/'.Request::active()->action, $data); } }
It looks like you're new here. If you want to get involved, click one of these buttons!