1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
httpmethod.php
См. документацию.
1<?php
2
3declare(strict_types=1);
4
5namespace Bitrix\Main\Engine\ActionFilter\Attribute\Rule;
6
7use Attribute;
8use Bitrix\Main\Engine\ActionFilter\Attribute\FilterAttributeInterface;
9use Bitrix\Main\Engine\ActionFilter\FilterType;
10
11#[Attribute(Attribute::TARGET_METHOD)]
13{
14 public function __construct(
15 private readonly array $allowedMethods = [\Bitrix\Main\Engine\ActionFilter\HttpMethod::METHOD_GET],
16 private readonly FilterType $type = FilterType::EnablePrefilter,
17 )
18 {
19
20 }
21
22 public function getFilters(): array
23 {
24 if ($this->type->isNegative())
25 {
26 return [\Bitrix\Main\Engine\ActionFilter\HttpMethod::class];
27 }
28
29 return [new \Bitrix\Main\Engine\ActionFilter\HttpMethod($this->allowedMethods)];
30 }
31
32 public function getType(): FilterType
33 {
34 return $this->type;
35 }
36}
$type
Определения options.php:106
__construct(private readonly array $allowedMethods=[\Bitrix\Main\Engine\ActionFilter\HttpMethod::METHOD_GET], private readonly FilterType $type=FilterType::EnablePrefilter,)
Определения httpmethod.php:14
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
Определения action.php:3