Type Alias ext_php_rs::zend::SapiGlobals
source · pub type SapiGlobals = sapi_globals_struct;
Expand description
Stores global variables used in the SAPI.
Aliased Type§
struct SapiGlobals {Show 17 fields
pub server_context: *mut c_void,
pub request_info: sapi_request_info,
pub sapi_headers: sapi_headers_struct,
pub read_post_bytes: i64,
pub post_read: u8,
pub headers_sent: u8,
pub global_stat: stat,
pub default_mimetype: *mut i8,
pub default_charset: *mut i8,
pub rfc1867_uploaded_files: *mut _zend_array,
pub post_max_size: i64,
pub options: i32,
pub sapi_started: bool,
pub global_request_time: f64,
pub known_post_content_types: _zend_array,
pub callback_func: _zval_struct,
pub fci_cache: _zend_fcall_info_cache,
}
Fields§
§server_context: *mut c_void
§request_info: sapi_request_info
§sapi_headers: sapi_headers_struct
§read_post_bytes: i64
§post_read: u8
§headers_sent: u8
§global_stat: stat
§default_mimetype: *mut i8
§default_charset: *mut i8
§rfc1867_uploaded_files: *mut _zend_array
§post_max_size: i64
§options: i32
§sapi_started: bool
§global_request_time: f64
§known_post_content_types: _zend_array
§callback_func: _zval_struct
§fci_cache: _zend_fcall_info_cache
Implementations§
source§impl SapiGlobals
impl SapiGlobals
sourcepub fn get() -> GlobalReadGuard<Self>
pub fn get() -> GlobalReadGuard<Self>
Returns a reference to the PHP process globals.
The process globals are guarded by a RwLock. There can be multiple immutable references at one time but only ever one mutable reference. Attempting to retrieve the globals while already holding the global guard will lead to a deadlock. Dropping the globals guard will release the lock.
sourcepub fn get_mut() -> GlobalWriteGuard<Self>
pub fn get_mut() -> GlobalWriteGuard<Self>
Returns a mutable reference to the PHP executor globals.
The executor globals are guarded by a RwLock. There can be multiple immutable references at one time but only ever one mutable reference. Attempting to retrieve the globals while already holding the global guard will lead to a deadlock. Dropping the globals guard will release the lock.