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/rospirotorg.ru/bitrix/modules/main/lib/text/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/main/lib/text/dateconverterresult.php
<?php
namespace Bitrix\Main\Text;

/**
 * Class DateConverterResult
 * @package Bitrix\Main\Text
 */
class DateConverterResult
{
	/**
	 * @var \Bitrix\Main\Type\DateTime|null
	 */
	private $date = null;
	
	/**
	 * @var string
	 */
	private $text = '';
	
	/**
	 * @var integer
	 */
	private $textPosition = 0;
	
	/**
	 * @var integer
	 */
	private $textLength = 0;
	
	/**
	 * @var string
	 */
	private $type = '';
	
	/**
	 * @var array
	 */
	private $metrics = Array();
	
	/**
	 * @var array
	 */
	private $metricModifier = Array();
	
	const TYPE_UNKNOWN = 'UNKNOWN';
	const TYPE_RELATIVE = 'RELATIVE';
	const TYPE_DAYOFWEEK = 'DAYOFWEEK';
	const TYPE_MODIFIER = 'MODIFIER';
	const TYPE_CALENDAR = 'CALENDAR';
	const TYPE_PARTOFDAY = 'PARTOFDAY';

	/**
	 * DateConverterResult constructor.
	 * @param \Bitrix\Main\Type\DateTime $date
	 * @param string $text
	 * @param $type
	 * @param array $metrics
	 * @param array $metricModifier
	 */
	function __construct(\Bitrix\Main\Type\DateTime $date, $matchParams, $type = self::TYPE_UNKNOWN, $metrics = Array(), $metricModifier = Array())
	{
		$this->date = $date;
		$this->type = $type;
		if (is_array($matchParams))
		{
			$this->text = $matchParams['TEXT'];
			$this->textPosition = $matchParams['POSITION'];
			$this->textLength = $matchParams['LENGTH'];
		}
		$this->metrics = $metrics;
		$this->metricModifier = $metricModifier;
	}

	/**
	 * Date from the text
	 * 
	 * @return \Bitrix\Main\Type\DateTime|null
	 */
	public function getDate()
	{
		return $this->date;
	}

	/**
	 * The string used to build the date
	 * 
	 * @return string
	 */
	public function getText()
	{
		return $this->text;
	}
	
	/**
	 * Position of string used to build the date
	 * 
	 * @return integer
	 */
	public function getTextPosition()
	{
		return $this->textPosition;
	}
	
	/**
	 * Length of string used to build the date
	 * 
	 * @return integer
	 */
	public function getTextLength()
	{
		return $this->textLength;
	}

	/**
	 * Get primary recognition type
	 * 
	 * @return string
	 */
	public function getType()
	{
		return $this->type;
	}

	/**
	 * Get recognition metrics
	 * 
	 * @return array
	 */
	public function getMetrics()
	{
		return $this->metrics;
	}

	/**
	 * Get recognition metric modifier
	 * 
	 * @return array
	 */
	public function getMetricModifier()
	{
		return $this->metricModifier;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit