Source
xxxxxxxxxx
<?php
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** 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 Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
abstract class CController {
protected const POST_CONTENT_TYPE_FORM = 0;
protected const POST_CONTENT_TYPE_JSON = 1;
protected const VALIDATION_OK = 0;
protected const VALIDATION_ERROR = 1;
protected const VALIDATION_FATAL_ERROR = 2;
/**
* Content type of the POST request.
*
* @var int
*/
private $post_content_type = self::POST_CONTENT_TYPE_FORM;
/**
* Action name, so that controller knows which action is being executed.
*
* @var string
*/
private $action;
/**
* Response object generated by controller.
*
* @var CControllerResponse
*/
private $response;
/**
* Result of input validation, one of VALIDATION_OK, VALIDATION_ERROR, VALIDATION_FATAL_ERROR.
*
* @var int
*/
private $validation_result;
/**
* Non-validated input parameters.
*
* @var array|null
*/
private $raw_input;
/**
* Validated input parameters.
*