Refactored view/template.

This commit is contained in:
Dmitry Khomutov 2018-02-16 20:18:04 +07:00
commit 597a20deea
No known key found for this signature in database
GPG key ID: EC19426474B37AAC
34 changed files with 179 additions and 801 deletions

View file

@ -6,22 +6,26 @@ use b8\Config;
use b8\Exception\HttpException\ForbiddenException;
use b8\Http\Request;
use b8\Http\Response;
use b8\View;
class Controller extends \b8\Controller
{
/**
* @var \b8\View
* @var View
*/
protected $controllerView;
/**
* @var \b8\View
* @var View
*/
protected $view;
/**
* @var \b8\View
* @var string
*/
protected $className;
/**
* @var View
*/
public $layout;
@ -55,7 +59,7 @@ class Controller extends \b8\Controller
if (View::exists($this->className)) {
$this->controllerView = new View($this->className);
} else {
$this->controllerView = new View\Template('{@content}');
$this->controllerView = new View('{@content}');
}
}