1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
attributereader.php
См. документацию.
1
<?php
2
3
declare(strict_types=1);
4
5
namespace
Bitrix\Main\Engine\ActionFilter\Attribute
;
6
7
use ReflectionAttribute;
8
use ReflectionMethod;
9
10
class
AttributeReader
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
$type
Определения
options.php:106
Bitrix\Main\Engine\ActionFilter\Attribute\AttributeReader
Определения
attributereader.php:11
Bitrix\Main\Engine\ActionFilter\Attribute\AttributeReader\buildConfig
buildConfig(ReflectionMethod $method)
Определения
attributereader.php:12
Bitrix\Main\Engine\ActionFilter\Attribute\AttributeReader\hasMethodFilterAttributes
hasMethodFilterAttributes(ReflectionMethod $method)
Определения
attributereader.php:29
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
Bitrix\Main\Engine\ActionFilter\Attribute
Определения
attributereader.php:5
$method
$method
Определения
index.php:27
bitrix
modules
main
lib
engine
actionfilter
attribute
attributereader.php
Создано системой
1.14.0