ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
UsageOfAttributeFinder.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace 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 }
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...
isClassMatching(string $attribute, \ReflectionClass $r)
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...
$r