ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
UsageOfAttributeFinder.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Setup;
22
27{
28 public function getMatchingClassNames(
29 string $attribute,
30 array $additional_ignore = [],
31 ?string $matching_path = null
32 ): \Iterator {
34 fn (\ReflectionClass $r) => $this->isClassMatching($attribute, $r),
35 $additional_ignore,
36 $matching_path
37 );
38 }
39
40 public function isClassMatching(string $attribute, \ReflectionClass $r): bool
41 {
42 return ($r->isInstantiable() && $r->getAttributes($attribute) !== []);
43 }
44}
genericGetMatchingClassNames(callable $is_matching, array $additional_ignore=[], ?string $matching_path=null)
The matcher finds the class names implementing the given interface, while ignoring paths in self::$ig...
isClassMatching(string $attribute, \ReflectionClass $r)
getMatchingClassNames(string $attribute, array $additional_ignore=[], ?string $matching_path=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...