public static function getView($layout = null) { if (null === self::$_view) { self::$_view = new self(); /** * определяем текущий вид (лэйаут) */ if ($layout === null) { self::$layout = Liw::$config['def_layout']; } else { self::$layout = $layout; } } return self::$_view; }
public function getView($layout = null) { if (null === self::$_view) { self::$_view = new self(); } /** * определяем текущий вид (лэйаут) */ if ($layout === null) { if (Liw::$config['def_layout'] !== null) { self::$layout = LIW_WEB . 'views/layouts/' . Liw::$config['def_layout'] . '.php'; } else { $this->view = Lang::uage('def_layout_not_exist'); require_once LIW_CORE . 'core/error/view/index.php'; exit; } } else { self::$layout = LIW_WEB . 'views/layouts/' . $layout . '.php'; } return self::$_view; }