Skip to main content

SapiRequestInfo

Type Alias SapiRequestInfo 

Source
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§cookie_data: *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: i32

Implementations§

Source§

impl SapiRequestInfo

Source

pub fn request_method(&self) -> Option<&str>

Get the request method.

Source

pub fn query_string(&self) -> Option<&str>

Get the query string.

Source

pub fn cookie_data(&self) -> Option<&str>

Get the cookie data.

Source

pub fn content_length(&self) -> i64

Get the content length.

Source

pub fn path_translated(&self) -> Option<&str>

Get the path info.

Source

pub fn request_uri(&self) -> Option<&str>

Get the request uri.

Source

pub fn content_type(&self) -> Option<&str>

Get the content type.

Source

pub fn headers_only(&self) -> bool

Whether the request consists of headers only.

Source

pub fn no_headers(&self) -> bool

Whether the request has no headers.

Source

pub fn headers_read(&self) -> bool

Whether the request headers have been read.

Source

pub fn auth_user(&self) -> Option<&str>

Get the auth user.

Source

pub fn auth_password(&self) -> Option<&str>

Get the auth password.

Source

pub fn auth_digest(&self) -> Option<&str>

Get the auth digest.

Source

pub fn argv0(&self) -> Option<&str>

Get argv0.

Source

pub fn current_user(&self) -> Option<&str>

Get the current user.

Source

pub fn current_user_length(&self) -> i32

Available on non-php86 only.

Get the current user length.

PHP 8.6 removes this field. Use Self::current_user instead.

Source

pub fn argvc(&self) -> i32

Get argvc.

Source

pub fn argv(&self) -> Option<&str>

Get argv.

Source

pub fn proto_num(&self) -> i32

Get the protocol number.