Skip to content

Commit 4e8bec7

Browse files
authored
Add helper for class name (#255)
1 parent 3e378f8 commit 4e8bec7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/zend/class.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ impl ClassEntry {
7979
Self::try_find(name.as_str().ok()?)
8080
}
8181
}
82+
83+
pub fn name(&self) -> Option<&str> {
84+
unsafe { self.name.as_ref().and_then(|s| s.as_str().ok()) }
85+
}
8286
}
8387

8488
impl PartialEq for ClassEntry {

0 commit comments

Comments
 (0)