Skip to content

Conversation

@mambax7
Copy link
Collaborator

@mambax7 mambax7 commented Oct 20, 2023

No description provided.

@GregMage
Copy link
Contributor

What are the benefits of making this change?

@mambax7
Copy link
Collaborator Author

mambax7 commented Oct 20, 2023

We want to verify the existence of a particular method (renderWhere()) in an object before calling it, and neither is_subclass_of nor instanceof would be sufficient by themselves. Both of these checks are geared towards type-hierarchy validation but don't guarantee that a particular method (renderWhere()) exists.
This approach checks that $criteria is set and that the object has a renderWhere() method, which is exactly what we want to do. It is more straightforward and directly aligned with the intent.

@GregMage
Copy link
Contributor

great, thanks

@mambax7 mambax7 merged commit 1739e88 into XOOPS:master Oct 20, 2023
@mambax7 mambax7 deleted the feature/improve_check_for_renderWhere() branch October 20, 2023 16:08
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.

2 participants