|
| | 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::$ignore and and the additional patterns provided. More...
|
| |
| | getAllClassNames (array $additional_ignore, string $matching_path=null) |
| |
Definition at line 28 of file AbstractOfFinder.php.
◆ __construct()
| ILIAS\Setup\AbstractOfFinder::__construct |
( |
| ) |
|
Definition at line 54 of file AbstractOfFinder.php.
56 $this->root = substr(__FILE__, 0, strpos(__FILE__, DIRECTORY_SEPARATOR .
"src"));
57 $external_classmap = include
"./libs/composer/vendor/composer/autoload_classmap.php";
58 $this->classmap = $external_classmap ?: null;
◆ genericGetMatchingClassNames()
| ILIAS\Setup\AbstractOfFinder::genericGetMatchingClassNames |
( |
callable |
$is_matching, |
|
|
array |
$additional_ignore = [], |
|
|
string |
$matching_path = null |
|
) |
| |
|
protected |
◆ getAllClassNames()
| ILIAS\Setup\AbstractOfFinder::getAllClassNames |
( |
array |
$additional_ignore, |
|
|
string |
$matching_path = null |
|
) |
| |
|
protected |
- Parameters
-
| string[] | $additional_ignore |
Definition at line 94 of file AbstractOfFinder.php.
References $path.
Referenced by ILIAS\Setup\AbstractOfFinder\genericGetMatchingClassNames().
96 $ignore = array_merge($this->ignore, $additional_ignore);
98 if (!is_array($this->classmap)) {
99 throw new \LogicException(
"Composer ClassMap not loaded");
106 fn($v):
string =>
"(" . str_replace(
'/',
'(/|\\\\)', $v) .
")",
110 if ($matching_path) {
111 $matching_path = str_replace(
'/',
'(/|\\\\)', $matching_path);
115 foreach ($this->classmap as $class_name => $file_path) {
116 $real_path = realpath($file_path);
117 if ($real_path ===
false) {
118 throw new \RuntimeException(
119 "Could not find file for class $class_name (path: $file_path). " .
120 "Please check the composer classmap, maybe it is outdated. " .
121 "You can regenerate it by executing 'composer du' or 'composer install' " .
122 "(which also ensures dependencies are correctly installed) in the ILIAS root directory." 126 $path = str_replace($this->root,
"", $real_path);
127 if ($matching_path && !preg_match(
"#^" . $matching_path .
"$#",
$path)) {
130 if (!preg_match(
"#^" . $regexp .
"$#",
$path)) {
◆ $classmap
| array ILIAS\Setup\AbstractOfFinder::$classmap = null |
|
protected |
◆ $ignore
| array ILIAS\Setup\AbstractOfFinder::$ignore |
|
protected |
Initial value:= [
'.*/src/Setup/',
'.*/src/GlobalScreen/',
'.*/Customizing/.*/src/',
'.*/libs/',
'.*/test/',
'.*/tests/',
'.*/setup/',
'.*ilSOAPAuth.*',
'.*ilPDExternalFeedBlockGUI.*',
]
Definition at line 35 of file AbstractOfFinder.php.
◆ $root
| string ILIAS\Setup\AbstractOfFinder::$root |
|
protected |
The documentation for this class was generated from the following file: