ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ImplementationOfInterfaceFinder.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Setup;
22 
28 class ImplementationOfInterfaceFinder extends AbstractOfFinder
29 {
30  public function getMatchingClassNames(
31  string $interface,
32  array $additional_ignore = [],
33  string $matching_path = null
34  ): \Iterator {
36  fn (\ReflectionClass $r) => $this->isClassMatching($interface, $r),
37  $additional_ignore,
38  $matching_path
39  );
40  }
41 
42  public function isClassMatching(string $interface, \ReflectionClass $r): bool
43  {
44  return ($r->isInstantiable() && $r->implementsInterface($interface));
45  }
46 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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 $interface, \ReflectionClass $r)
getMatchingClassNames(string $interface, array $additional_ignore=[], string $matching_path=null)
$r