AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 18.118.30.253
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/bitrix/www/bitrix/modules/calendar/lib/ical/basic/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/bitrix/www/bitrix/modules/calendar/lib/ical/basic/content.php
<?php

namespace Bitrix\Calendar\ICal\Basic;

use Bitrix\Main\Type\Date;

class Content
{
	private $type;
	private $properties = [];
	private $subComponents = [];

	public static function getInstance(string $type): Content
	{
		return new self($type);
	}

	public function __construct(string $type)
	{
		$this->type = $type;
	}

	public function property(PropertyType $property, array $parameters = null): Content
	{
		$property->addParameters($parameters ?? []);

		$this->properties[] = $property;

		return $this;
	}

	public function dateTimeProperty(
		$names,
		Date $value,
		bool $withTime = false,
		bool $withTimeZone = false,
		bool $isUTC = false
	): Content
	{
		if ($value === null)
		{
			return $this;
		}

		return $this->property(new DateTimePropertyType($names, $value, $withTime, $withTimeZone, $isUTC));
	}

	public function textProperty($names, ?string $value, bool $disableEscaping = false) : Content
	{
		if ($value === null) {
			return $this;
		}

		return $this->property(new TextPropertyType($names, $value, $disableEscaping));
	}

	public function timezoneOffsetProperty(
		$names,
		\DateTimeZone $value
	): Content
	{
		if ($value === null)
		{
			return $this;
		}

		return $this->property(new DateTimePropertyType($names, $value));
	}

	public function subComponent(BasicComponent ...$components) : Content
	{
		foreach ($components as $component)
		{
			$this->subComponents[] = $component;
		}

		return $this;
	}

	public function getType() : string
	{
		return $this->type;
	}

	public function getProperties() : array
	{
		return $this->properties;
	}

	public function getSubComponents() : array
	{
		return $this->subComponents;
	}
}

Anon7 - 2022
AnonSec Team