pub type SapiModule = _sapi_module_struct;Expand description
Stores the SAPI module used in the PHP executor.
Aliased Type§
#[repr(C)]pub struct SapiModule {Show 36 fields
    pub name: *mut u8,
    pub pretty_name: *mut u8,
    pub startup: Option<unsafe extern "C" fn(*mut _sapi_module_struct) -> i32>,
    pub shutdown: Option<unsafe extern "C" fn(*mut _sapi_module_struct) -> i32>,
    pub activate: Option<unsafe extern "C" fn() -> i32>,
    pub deactivate: Option<unsafe extern "C" fn() -> i32>,
    pub ub_write: Option<unsafe extern "C" fn(*const u8, usize) -> usize>,
    pub flush: Option<unsafe extern "C" fn(*mut c_void)>,
    pub get_stat: Option<unsafe extern "C" fn() -> *mut stat>,
    pub getenv: Option<unsafe extern "C" fn(*const u8, usize) -> *mut u8>,
    pub sapi_error: Option<unsafe extern "C" fn(i32, *const u8, ...)>,
    pub header_handler: Option<unsafe extern "C" fn(*mut sapi_header_struct, u32, *mut sapi_headers_struct) -> i32>,
    pub send_headers: Option<unsafe extern "C" fn(*mut sapi_headers_struct) -> i32>,
    pub send_header: Option<unsafe extern "C" fn(*mut sapi_header_struct, *mut c_void)>,
    pub read_post: Option<unsafe extern "C" fn(*mut u8, usize) -> usize>,
    pub read_cookies: Option<unsafe extern "C" fn() -> *mut u8>,
    pub register_server_variables: Option<unsafe extern "C" fn(*mut _zval_struct)>,
    pub log_message: Option<unsafe extern "C" fn(*const u8, i32)>,
    pub get_request_time: Option<unsafe extern "C" fn(*mut f64) -> i32>,
    pub terminate_process: Option<unsafe extern "C" fn()>,
    pub php_ini_path_override: *mut u8,
    pub default_post_reader: Option<unsafe extern "C" fn()>,
    pub treat_data: Option<unsafe extern "C" fn(i32, *mut u8, *mut _zval_struct)>,
    pub executable_location: *mut u8,
    pub php_ini_ignore: i32,
    pub php_ini_ignore_cwd: i32,
    pub get_fd: Option<unsafe extern "C" fn(*mut i32) -> i32>,
    pub force_http_10: Option<unsafe extern "C" fn() -> i32>,
    pub get_target_uid: Option<unsafe extern "C" fn(*mut u32) -> i32>,
    pub get_target_gid: Option<unsafe extern "C" fn(*mut u32) -> i32>,
    pub input_filter: Option<unsafe extern "C" fn(i32, *const u8, *mut *mut u8, usize, *mut usize) -> u32>,
    pub ini_defaults: Option<unsafe extern "C" fn(*mut _zend_array)>,
    pub phpinfo_as_text: i32,
    pub ini_entries: *const u8,
    pub additional_functions: *const _zend_function_entry,
    pub input_filter_init: Option<unsafe extern "C" fn() -> u32>,
}Fields§
§name: *mut u8§pretty_name: *mut u8§startup: Option<unsafe extern "C" fn(*mut _sapi_module_struct) -> i32>§shutdown: Option<unsafe extern "C" fn(*mut _sapi_module_struct) -> i32>§activate: Option<unsafe extern "C" fn() -> i32>§deactivate: Option<unsafe extern "C" fn() -> i32>§ub_write: Option<unsafe extern "C" fn(*const u8, usize) -> usize>§flush: Option<unsafe extern "C" fn(*mut c_void)>§get_stat: Option<unsafe extern "C" fn() -> *mut stat>§getenv: Option<unsafe extern "C" fn(*const u8, usize) -> *mut u8>§sapi_error: Option<unsafe extern "C" fn(i32, *const u8, ...)>§header_handler: Option<unsafe extern "C" fn(*mut sapi_header_struct, u32, *mut sapi_headers_struct) -> i32>§send_headers: Option<unsafe extern "C" fn(*mut sapi_headers_struct) -> i32>§send_header: Option<unsafe extern "C" fn(*mut sapi_header_struct, *mut c_void)>§read_post: Option<unsafe extern "C" fn(*mut u8, usize) -> usize>§register_server_variables: Option<unsafe extern "C" fn(*mut _zval_struct)>§log_message: Option<unsafe extern "C" fn(*const u8, i32)>§get_request_time: Option<unsafe extern "C" fn(*mut f64) -> i32>§terminate_process: Option<unsafe extern "C" fn()>§php_ini_path_override: *mut u8§default_post_reader: Option<unsafe extern "C" fn()>§treat_data: Option<unsafe extern "C" fn(i32, *mut u8, *mut _zval_struct)>§executable_location: *mut u8§php_ini_ignore: i32§php_ini_ignore_cwd: i32§get_fd: Option<unsafe extern "C" fn(*mut i32) -> i32>§force_http_10: Option<unsafe extern "C" fn() -> i32>§get_target_uid: Option<unsafe extern "C" fn(*mut u32) -> i32>§get_target_gid: Option<unsafe extern "C" fn(*mut u32) -> i32>§input_filter: Option<unsafe extern "C" fn(i32, *const u8, *mut *mut u8, usize, *mut usize) -> u32>§ini_defaults: Option<unsafe extern "C" fn(*mut _zend_array)>§phpinfo_as_text: i32§ini_entries: *const u8§additional_functions: *const _zend_function_entry§input_filter_init: Option<unsafe extern "C" fn() -> u32>Implementations§
Source§impl SapiModule
 
impl SapiModule
Sourcepub fn get() -> GlobalReadGuard<Self>
 
pub fn get() -> GlobalReadGuard<Self>
Returns a reference to the PHP SAPI module.
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.
§Panics
- If static executor globals are not set
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.
§Panics
- If static executor globals are not set