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

Add \Xmf\Module\Helper::getClass($name, bool $required = false) method #31

Open
zyspec opened this issue May 2, 2017 · 0 comments
Open

Comments

@zyspec
Copy link

zyspec commented May 2, 2017

Enhancement
If would be useful to have the ability to use \Xmf\Module\Helper to load a class file that doesn't have a handler (like interfaces, misc minor classes, etc). The code would be similar to the loadLanguage() and getHandler() methods but all it does is checks to see if the class is loaded (e.g. exists), or if not check to see if file exists and then does either an include_once or require_once. The method then logs the results and returns true|false.

Invoking the class would then just be \Xmf\Module\Helper->getClass('constants', true); to load the Constants interface (in this example).

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

No branches or pull requests

2 participants