Welcome to the Treehouse Community
Looking to learn something new?
Question about autoloader function
I was curious as to why we used
__DIR__ . '/*'
__DIR__ . '/classes'
since we were only looking for classes anyway.
Brandyn Lordi17,776 Points
So we can check every file inside every folder. If we want to use a different file down the road that might not be inside the classes folder, this function will still work.
The function is looping through each directory that's inside the current directory- in search of matching files.