Type Definition ext_php_rs::zend::ClassEntry
source · pub type ClassEntry = zend_class_entry;
Expand description
A PHP class entry.
Represents a class registered with the PHP interpreter.
Implementations§
source§impl ClassEntry
impl ClassEntry
sourcepub fn try_find(name: &str) -> Option<&'static Self>
pub fn try_find(name: &str) -> Option<&'static Self>
Attempts to find a reference to a class in the global class table.
Returns a reference to the class if found, or None
if the class
could not be found or the class table has not been initialized.
sourcepub fn flags(&self) -> ClassFlags
pub fn flags(&self) -> ClassFlags
Returns the class flags.
sourcepub fn is_interface(&self) -> bool
pub fn is_interface(&self) -> bool
Returns true
if the class entry is an interface, and false
otherwise.
sourcepub fn instance_of(&self, other: &ClassEntry) -> bool
pub fn instance_of(&self, other: &ClassEntry) -> bool
Checks if the class is an instance of another class or interface.
Parameters
other
- The inherited class entry to check.
sourcepub fn interfaces(&self) -> Option<impl Iterator<Item = &ClassEntry>>
pub fn interfaces(&self) -> Option<impl Iterator<Item = &ClassEntry>>
Returns an iterator of all the interfaces that the class implements.
Returns None
if the interfaces have not been resolved on the
class.