1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
attributereader.php
См. документацию.
1<?php
2
3declare(strict_types=1);
4
6
7use ReflectionAttribute;
8use ReflectionMethod;
9
11{
12 public function buildConfig(ReflectionMethod $method): array
13 {
14 $configuration = [];
15
16 $attributes = $method->getAttributes(FilterAttributeInterface::class, ReflectionAttribute::IS_INSTANCEOF);
17 foreach ($attributes as $reflectionAttribute)
18 {
19 $attribute = $reflectionAttribute->newInstance();
20
21 $type = $attribute->getType()->value;
22
23 $configuration[$type] = [...$configuration[$type] ?? [], ...$attribute->getFilters()];
24 }
25
26 return $configuration;
27 }
28
29 public function hasMethodFilterAttributes(ReflectionMethod $method): bool
30 {
31 return !empty(
32 $method->getAttributes(FilterAttributeInterface::class, ReflectionAttribute::IS_INSTANCEOF)
33 );
34 }
35}
$type
Определения options.php:106
hasMethodFilterAttributes(ReflectionMethod $method)
Определения attributereader.php:29
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$method
Определения index.php:27