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

Make structure of classes compatible with PSR-4 #195

Open
andergmartins opened this issue May 10, 2018 · 0 comments
Open

Make structure of classes compatible with PSR-4 #195

andergmartins opened this issue May 10, 2018 · 0 comments

Comments

@andergmartins
Copy link
Contributor

For our libraries we use the pattern PSR-4.
In short, instead of the internal classes be located at ./includes and each file having the "Embed" prefix, we should create a "embedpress" folder inside the library dir, and rename the files:

includes/EmbedPress.php --> library/embedpress/Core.php
includes/EmbedPressLoader.php --> library/embedpress/Loader.php,

etc.

Another change will be to use PHP namespaces for that classes:

Alledia\EmbedPress\Loader for example, instead of EmbedPressLoader

That allow us to use the composer autoloader to load the classes without the need to include each one.

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

2 participants