• Модуль: scale
  • Путь к файлу: ~/bitrix/modules/scale/lib/action.php
  • Класс: BitrixScaleAction
  • Вызов: Action::__construct
public function __construct($actionId, $actionParams, $serverHostname="", $userParams = array(), $freeParams = array())
{
	if($actionId == '')
		throw new BitrixMainArgumentNullException("actionId");

	if(!is_array($actionParams) || empty($actionParams))
		throw new Exception("Params of action ".$actionId." are not defined correctly!");

	if(!isset($actionParams["START_COMMAND_TEMPLATE"]) || $actionParams["START_COMMAND_TEMPLATE"] == '')
		throw new Exception("Required param START_COMMAND_TEMPLATE of action ".$actionId." are not defined!");

	if(!is_array($userParams))
		throw new BitrixMainArgumentTypeException("userParams", "array");

	if(!is_array($freeParams))
		throw new BitrixMainArgumentTypeException("freeParams", "array");

	$this->id = $actionId;
	$this->userParams = $userParams;
	$this->freeParams = $freeParams;
	$this->actionParams = $actionParams;
	$this->serverHostname = $serverHostname;
	$this->shellAdapter = new ShellAdapter;

	if(isset($actionParams["LOG_LEVEL"]))
		$this->logLevel = $actionParams["LOG_LEVEL"];
}