Skip to content

Commit

Permalink
Fix class loader to work with any top-level source folder
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-schindler committed May 12, 2023
1 parent 327fe78 commit 4ecbf8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ClassLoader
*/
public static function 파람(): void
{
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'src'), RecursiveIteratorIterator::SELF_FIRST);
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR), RecursiveIteratorIterator::SELF_FIRST);
foreach ($files as $file)
if (pathinfo($file->getFileName(), PATHINFO_EXTENSION) == 'php' && !str_contains($file->getPathname(), 'vendor'))
self::$classes[strval(str_replace('.php', '', $file->getFileName()))] = $file->getPathname();
Expand Down

0 comments on commit 4ecbf8b

Please sign in to comment.