Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,14 @@ recursively by passing `false` to the 5th parameter:
```php
$explorer = new GlobClassExplorer('\\This\\Namespace\\Only\\', $psr16Cache, $cacheTtl, null, false);
```

You can also get a class map using the `getClassMap` method.
A class map is an array associating the name of the classes found (in key), to the file they are
linked to (a `SplFileInfo` in value).

```php
$classMap = $explorer->getClassMap();
foreach ($classMap as $class => $fileInfo) {
echo 'Class '.$class.' found in file '.$fileInfo->getPathname();
}
```