Source
<?php declare(strict_types = 0);
/*
** Zabbix
** Copyright (C) 2001-2023 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
/**
* Class for rendering views.
*/
class CView {
/**
* Directory list of MVC views ordered by search priority.
*/
private static array $directories = ['local/app/views', 'app/views', 'include/views'];
/**
* Indicates support of web layout modes.
*/
private bool $layout_modes_enabled = false;
/**
* Explicitly set layout mode.
*/
private ?int $layout_mode = null;
/**
* Directory where the view file was found.
*/
private ?string $directory = null;
private string $assets_path = 'assets';
/**
* View name.
*/
private string $name;
/**
* List of JavaScript files for inclusion into HTML page using <script src="...">.
*/
private array $js_files = [];
/**
* List of CSS files for inclusion into HTML page using <link rel="stylesheet" type="text/css" src="...">.
*/
private array $css_files = [];