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

Allow full qualified class names as component type; Also fixed some f… #43

Merged

Conversation

osnard
Copy link
Contributor

@osnard osnard commented Oct 4, 2017

…ormatting

$parent = $description->parentNode;

if ( $parent instanceof DOMElement && $parent->hasAttribute( 'type' ) ) {
if ( class_exists( $className ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like the idea, but putting the check here may lead to the wrong class being used, e.g. for Html. There is a component Html, but also a class with that name in the root namespace.
I would propose first trying for NAMESPACE_HIERARCHY\parent\component, then NAMESPACE_HIERARCHY\component, and only as a last resort check if the class exists in the root namespace directly.

@s7eph4n s7eph4n merged commit 7a33b13 into ProfessionalWiki:master Oct 5, 2017
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

Successfully merging this pull request may close these issues.

None yet

2 participants