ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
UsageOfAttributeFinder.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Setup;
22 
26 class UsageOfAttributeFinder extends AbstractOfFinder
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 }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getMatchingClassNames(string $attribute, array $additional_ignore=[], ?string $matching_path=null)
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
isClassMatching(string $attribute, \ReflectionClass $r)
$r