pub type SapiRequestInfo = sapi_request_info;Expand description
Information about the current request, as the SAPI gives it.
Aliased Type§
#[repr(C)]pub struct SapiRequestInfo {Show 22 fields
pub request_method: *const i8,
pub query_string: *mut i8,
pub cookie_data: *mut i8,
pub content_length: i64,
pub path_translated: *mut i8,
pub request_uri: *mut i8,
pub request_body: *mut _php_stream,
pub content_type: *const i8,
pub headers_only: bool,
pub no_headers: bool,
pub headers_read: bool,
pub post_entry: *mut _sapi_post_entry,
pub content_type_dup: *mut i8,
pub auth_user: *mut i8,
pub auth_password: *mut i8,
pub auth_digest: *mut i8,
pub argv0: *mut i8,
pub current_user: *mut i8,
pub current_user_length: i32,
pub argc: i32,
pub argv: *mut *mut i8,
pub proto_num: i32,
}Fields§
§request_method: *const i8§query_string: *mut i8§content_length: i64§path_translated: *mut i8§request_uri: *mut i8§request_body: *mut _php_stream§content_type: *const i8§headers_only: bool§no_headers: bool§headers_read: bool§post_entry: *mut _sapi_post_entry§content_type_dup: *mut i8§auth_user: *mut i8§auth_password: *mut i8§auth_digest: *mut i8§argv0: *mut i8§current_user: *mut i8§current_user_length: i32§argc: i32§argv: *mut *mut i8§proto_num: i32Implementations§
Source§impl SapiRequestInfo
impl SapiRequestInfo
Sourcepub fn request_method(&self) -> Option<&str>
pub fn request_method(&self) -> Option<&str>
Get the request method.
Sourcepub fn query_string(&self) -> Option<&str>
pub fn query_string(&self) -> Option<&str>
Get the query string.
Get the cookie data.
Sourcepub fn content_length(&self) -> i64
pub fn content_length(&self) -> i64
Get the content length.
Sourcepub fn path_translated(&self) -> Option<&str>
pub fn path_translated(&self) -> Option<&str>
Get the path info.
Sourcepub fn request_uri(&self) -> Option<&str>
pub fn request_uri(&self) -> Option<&str>
Get the request uri.
Sourcepub fn content_type(&self) -> Option<&str>
pub fn content_type(&self) -> Option<&str>
Get the content type.
Sourcepub fn headers_only(&self) -> bool
pub fn headers_only(&self) -> bool
Whether the request consists of headers only.
Sourcepub fn no_headers(&self) -> bool
pub fn no_headers(&self) -> bool
Whether the request has no headers.
Sourcepub fn headers_read(&self) -> bool
pub fn headers_read(&self) -> bool
Whether the request headers have been read.
Sourcepub fn auth_password(&self) -> Option<&str>
pub fn auth_password(&self) -> Option<&str>
Get the auth password.
Sourcepub fn auth_digest(&self) -> Option<&str>
pub fn auth_digest(&self) -> Option<&str>
Get the auth digest.
Sourcepub fn current_user(&self) -> Option<&str>
pub fn current_user(&self) -> Option<&str>
Get the current user.
Sourcepub fn current_user_length(&self) -> i32
Available on non-php86 only.
pub fn current_user_length(&self) -> i32
php86 only.Get the current user length.
PHP 8.6 removes this field. Use Self::current_user instead.