ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ImplementationOfInterfaceFinder.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Setup;
22
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}
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...
getMatchingClassNames(string $interface, array $additional_ignore=[], ?string $matching_path=null)
isClassMatching(string $interface, \ReflectionClass $r)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...