• Модуль: dav
  • Путь к файлу: ~/bitrix/modules/dav/classes/general/exchangeclientrequest.php
  • Класс: CDavExchangeClientRequest
  • Вызов: CDavExchangeClientRequest::CreateFindFolderBody
public function CreateFindFolderBody($arParentFolderId, $folderShape = "AllProperties")
{
	$arMapTmp = array("idonly" => "IdOnly", "id_only" => "IdOnly", "allproperties" => "AllProperties", "all_properties" => "AllProperties");
	$folderShapeLower = mb_strtolower($folderShape);
	if (array_key_exists($folderShapeLower, $arMapTmp))
	{
		$folderShape = $arMapTmp[$folderShapeLower];
	}
	else
	{
		$folderShape = "AllProperties";
	}

	$this->body  = "<"."?xml version="1.0" encoding="utf-8"?".">rn";
	$this->body .= "rn";
	$this->body .= " rn";
	$this->body .= "  rn";
	$this->body .= "   rn";
	$this->body .= "    ".$folderShape."rn";
	$this->body .= "   rn";

	$this->body .= "   rn";

	/*
	"calendar"
	array("id" => "calendar")
	array("id" => "calendar", "mailbox" => "aaa@bbb.cc")
	array("id" => "calendar", "mailbox" => array("aaa@bbb.cc", "ddd@eee.ff"))
	*/
	if (!is_array($arParentFolderId))
		$arParentFolderId = array("id" => $arParentFolderId);

	if (!in_array($arParentFolderId["id"], self::$arDistinguishedFolderIdNameType))
	{
		$this->body .= "    rn";
	}
	elseif (array_key_exists("mailbox", $arParentFolderId))
	{
		$arMailbox = $arParentFolderId["mailbox"];
		if (!is_array($arMailbox))
			$arMailbox = array($arMailbox);

		foreach ($arMailbox as $mailbox)
		{
			$this->body .= "    rn";
			$this->body .= "     ".htmlspecialcharsbx($mailbox)."rn";
			$this->body .= "    rn";
		}
	}
	else
	{
		$this->body .= "    rn";
	}

	$this->body .= "   rn";

	$this->body .= "  rn";
	$this->body .= " rn";
	$this->body .= "";
}