Merge pull request #258 from davidcole1340/functions-table-mut

Add helper method for function table
This commit is contained in:
Daniil Gentili 2023-11-24 13:56:31 +01:00 committed by GitHub
commit bb8f6081d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,6 +61,16 @@ impl ExecutorGlobals {
unsafe { self.class_table.as_ref() }
}
/// Attempts to retrieve the global functions hash table.
pub fn function_table(&self) -> Option<&ZendHashTable> {
unsafe { self.function_table.as_ref() }
}
/// Attempts to retrieve the global functions hash table as mutable.
pub fn function_table_mut(&self) -> Option<&mut ZendHashTable> {
unsafe { self.function_table.as_mut() }
}
/// Retrieves the ini values for all ini directives in the current executor
/// context..
pub fn ini_values(&self) -> HashMap<String, Option<String>> {