• Модуль: webdav
  • Путь к файлу: ~/bitrix/modules/webdav/classes/virtual.php
  • Класс: CWebDavVirtual
  • Вызов: CWebDavVirtual::__construct
public function __construct($arStructure, $base_url, $arParams = array())
{
	$arParams = (is_array($arParams) ? $arParams : array());
	parent::__construct($base_url);
	
	$this->arStructure = $arStructure;
	$this->permission =  $this->permission_real ;
	if ($this->permission_real >= "W")
		$this->check_creator = false;
	$this->USER["GROUPS"] = $GLOBALS["USER"]->GetUserGroupArray();
	$this->workflow = false;

	if(!isset($arParams["CACHE_TIME"]))
		$arParams["CACHE_TIME"] = 3600;
	if ($arParams["CACHE_TYPE"] == "Y" || ($arParams["CACHE_TYPE"] == "A" && COption::GetOptionString("main", "component_cache_on", "Y") == "Y"))
		$arParams["CACHE_TIME"] = intval($arParams["CACHE_TIME"]);
	else
		$arParams["CACHE_TIME"] = 0;

	$this->CACHE_TIME = $arParams["CACHE_TIME"] = 0; 
	$cache_hash = md5(serialize($arStructure));
	$this->CACHE_PATH = str_replace(array("///", "//"), "/", "/".SITE_ID."/webdav/".$cache_hash."/"); 
	$this->CACHE_OBJ = false; 
	if ($this->CACHE_TIME > 0)
	{
		$this->CACHE_OBJ = new CPHPCache;
	}
	
	if (!$this->SetRootSection($arParams["ROOT_SECTION_ID"]))
	{
		$this->arError[] = array(
			"id" => "root_section_is_not_found", 
			"text" => GetMessage("WD_ROOT_SECTION_NOT_FOUND")); 
	}
}