Type Alias ext_php_rs::zend::SapiModule

source ·
pub type SapiModule = _sapi_module_struct;
Expand description

Stores the SAPI module used in the PHP executor.

Aliased Type§

struct SapiModule {
Show 36 fields pub name: *mut i8, pub pretty_name: *mut i8, 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 i8, _: 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 i8, _: usize) -> *mut i8>, pub sapi_error: Option<unsafe extern "C" fn(_: i32, _: *const i8, ...)>, 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 i8, _: usize) -> usize>, pub read_cookies: Option<unsafe extern "C" fn() -> *mut i8>, pub register_server_variables: Option<unsafe extern "C" fn(_: *mut _zval_struct)>, pub log_message: Option<unsafe extern "C" fn(_: *const i8, _: 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 i8, pub default_post_reader: Option<unsafe extern "C" fn()>, pub treat_data: Option<unsafe extern "C" fn(_: i32, _: *mut i8, _: *mut _zval_struct)>, pub executable_location: *mut i8, 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 i8, _: *mut *mut i8, _: usize, _: *mut usize) -> u32>, pub ini_defaults: Option<unsafe extern "C" fn(_: *mut _zend_array)>, pub phpinfo_as_text: i32, pub ini_entries: *const i8, pub additional_functions: *const _zend_function_entry, pub input_filter_init: Option<unsafe extern "C" fn() -> u32>,
}

Fields§

§name: *mut i8§pretty_name: *mut i8§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 i8, _: 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 i8, _: usize) -> *mut i8>§sapi_error: Option<unsafe extern "C" fn(_: i32, _: *const i8, ...)>§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 i8, _: usize) -> usize>§read_cookies: Option<unsafe extern "C" fn() -> *mut i8>§register_server_variables: Option<unsafe extern "C" fn(_: *mut _zval_struct)>§log_message: Option<unsafe extern "C" fn(_: *const i8, _: i32)>§get_request_time: Option<unsafe extern "C" fn(_: *mut f64) -> i32>§terminate_process: Option<unsafe extern "C" fn()>§php_ini_path_override: *mut i8§default_post_reader: Option<unsafe extern "C" fn()>§treat_data: Option<unsafe extern "C" fn(_: i32, _: *mut i8, _: *mut _zval_struct)>§executable_location: *mut i8§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 i8, _: *mut *mut i8, _: usize, _: *mut usize) -> u32>§ini_defaults: Option<unsafe extern "C" fn(_: *mut _zend_array)>§phpinfo_as_text: i32§ini_entries: *const i8§additional_functions: *const _zend_function_entry§input_filter_init: Option<unsafe extern "C" fn() -> u32>

Implementations§

source§

impl SapiModule

source

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.

source

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.