pub type SapiGlobals = sapi_globals_struct;Expand description
Stores global variables used in the SAPI.
Aliased Type§
#[repr(C)]pub struct SapiGlobals {Show 18 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 u8,
pub default_charset: *mut u8,
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,
pub request_parse_body_context: sapi_request_parse_body_context,
}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 u8§default_charset: *mut u8§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§request_parse_body_context: sapi_request_parse_body_contextImplementations§
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.
Sourcepub fn request_info(&self) -> &sapi_request_info
pub fn request_info(&self) -> &sapi_request_info
Get the request info for the Sapi.
Sourcepub fn sapi_headers(&self) -> &SapiHeaders
pub fn sapi_headers(&self) -> &SapiHeaders
Get the sapi headers for the Sapi.