Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take advantage of autoloaders for including new Ad Servers #83

Open
jomurgel opened this issue Nov 12, 2021 · 0 comments
Open

Take advantage of autoloaders for including new Ad Servers #83

jomurgel opened this issue Nov 12, 2021 · 0 comments

Comments

@jomurgel
Copy link

Reference #82

Composer has support for generating an autoloader for you so you can "just use" the class and it will load the file on demand.

We'd probably need a class-map autoloader. https://getcomposer.org/doc/04-schema.md#classmap

The downside to a class-map autoloader is that it's really unintelligent and needs to be regenerated when you add a new file or rename an existing file. In OO programming where you potentially are creating new classes all the time, that's a hassle and so PSR-4 and PSR-12 were adopted so that loading classes can be inferred by convention. https://www.php-fig.org/psr/psr-4/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant