1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
MemberCursor.php
См. документацию.
1<?php
2
3declare(strict_types=1);
4
5namespace Bitrix\Im\V2\Chat\Member;
6
7use Bitrix\Im\V2\Chat;
8use Bitrix\Im\V2\Rest\RestConvertible;
9use Bitrix\Main\Validation\Rule\InArray;
10use Bitrix\Main\Validation\Rule\PositiveNumber;
11
13{
14 public function __construct(
15 #[InArray([Chat::ROLE_MEMBER, Chat::ROLE_MANAGER, Chat::ROLE_OWNER])]
16 public readonly string $role,
18 public readonly int $relationId,
19 ){}
20
21 public static function getRestEntityName(): string
22 {
23 return 'nextCursor';
24 }
25
26 public function toRestFormat(array $option = []): ?array
27 {
28 return [
29 'role' => mb_strtolower($this->role),
30 'relationId' => $this->relationId,
31 ];
32 }
33
34 public static function createFromArray(array $parameters): static
35 {
36 return new static(mb_strtoupper($parameters['role'] ?? ''), (int)($parameters['relationId'] ?? 0));
37 }
38}
__construct(#[InArray([Chat::ROLE_MEMBER, Chat::ROLE_MANAGER, Chat::ROLE_OWNER])] public readonly string $role, #[PositiveNumber] public readonly int $relationId,)
Определения MemberCursor.php:14
toRestFormat(array $option=[])
Определения MemberCursor.php:26
static createFromArray(array $parameters)
Определения MemberCursor.php:34
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$option
Определения options.php:1711