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 instance_of() and get_class_entry() methods on ZendObject #197

Merged
merged 1 commit into from
Nov 24, 2022

Conversation

ju1ius
Copy link
Contributor

@ju1ius ju1ius commented Nov 24, 2022

Summary:

  • adds ZendObject::get_class_entry() to retrieve the class entry of an object without casting pointers
  • adds ZendObject::instance_of() to allow more idiomatic instanceof checks.
  • adds a mention that ZendObject::is_instance::<T>() does not check the parent classes or interfaces. This bit me when I tried to check if my_object.is_instance::<MyInterface>() and it didn't work.

@ptondereau ptondereau changed the title adds instance_of() and get_class_entry() methods on ZendObject Add instance_of() and get_class_entry() methods on ZendObject Nov 24, 2022
@ptondereau ptondereau merged commit a331213 into davidcole1340:master Nov 24, 2022
@ju1ius ju1ius deleted the ju1ius/instanceof branch November 27, 2022 05:59
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