-
Notifications
You must be signed in to change notification settings - Fork 128
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
Split classes into different files #13
Comments
Should probably follow PHP FIG when doing this? |
I would suggest using composer for autoloading. It's in fact already doing it if the library is installed using composer: https://github.com/juho-jaakkola/h5p-php-library/blob/6773f7aad8f95d21c847e12e6ad781e1f8ff26b9/composer.json#L4-L8 Composer currently supports four different autoloading standards: https://getcomposer.org/doc/04-schema.md#autoload |
I saw the autoloading in composer, but I'm not sure as to how it works. Will it generate a file that needs to be included in the plugin/module? |
Yes. When you run |
I ended up just cutting them up and using Laravels IoC and a service provider to put them all together since 90% of the classes are singletons |
To make the code easier to work with, we should put each class into separate file. We should also add or create some sort of default autoloader.
The text was updated successfully, but these errors were encountered: