Server IP : 85.193.89.191 / Your IP : 18.191.108.13 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/core/role/ |
Upload File : |
<?php namespace Bitrix\Calendar\Core\Role; use Bitrix\Calendar\Core\Base\BaseProperty; abstract class BaseRole extends BaseProperty implements RoleEntityInterface { public const TYPE = 'user'; protected string $name = ''; protected ?int $id = null; public static function createInstance(string $name): RoleEntityInterface { return new static($name); } public function __construct(string $name) { $this->name = $name; } /** * @return string */ public function toString(): string { return $this->getFullName(); } /** * @return string[] */ public function getFields(): array { return [ 'name', 'id', ]; } /** * @return string */ public function getFullName(): string { return $this->name; } /** * @return int|null */ public function getId(): ?int { return $this->id; } /** * @return string */ public function getType(): string { return static::TYPE; } /** * @param string $name * @return BaseRole */ public function setName(string $name): BaseRole { $this->name = $name; return $this; } /** * @param int|null $id * @return BaseRole */ public function setId(?int $id): BaseRole { $this->id = $id; return $this; } }