90 : \Iterator
91 {
92 $ignore = array_merge($this->ignore, $additional_ignore);
93
94 if (!is_array($this->classmap)) {
95 throw new \LogicException("Composer ClassMap not loaded");
96 }
97
98 $regexp = implode(
99 "|",
100 array_map(
101
102 fn ($v): string => "(" . str_replace('/', '(/|\\\\)', $v) . ")",
104 )
105 );
106 if ($matching_path) {
107 $matching_path = str_replace('/', '(/|\\\\)', $matching_path);
108 }
109
110
111 foreach ($this->classmap as $class_name => $file_path) {
112 $real_path = realpath($file_path);
113 if ($real_path === false) {
114 throw new \RuntimeException(
115 "Could not find file for class $class_name (path: $file_path). " .
116 "Please check the composer classmap, maybe it is outdated. " .
117 "You can regenerate it by executing 'composer du' or 'composer install' " .
118 "(which also ensures dependencies are correctly installed) in the ILIAS root directory."
119 );
120 }
121
122 $path = str_replace($this->root,
"", $real_path);
123 if ($matching_path && !preg_match(
"#^" . $matching_path .
"$#",
$path)) {
124 continue;
125 }
126 if (!preg_match(
"#^" . $regexp .
"$#",
$path)) {
127 yield $class_name;
128 }
129 }
130 }