Свойство | Type | Description | |
---|---|---|---|
$attributes | array | Array that contains the attributes of this context. | |
$authType | string | The request's authentication type. | |
$authenticationManager | AppserverIo\Appserver\ServletEngine\Security\AuthenticationManagerInterface | The session manager instance. | |
$baseModifier | string | Base modifier which allows for base path generation within rewritten URL environments. | |
$bodyStream | resource | The body content stream resource. | |
$context | AppserverIo\Psr\Context\ContextInterface | The request context instance. | |
$contextPath | string | The application context name. | |
$dispatched | boolean | Whether or not the request has been dispatched. | |
$documentRoot | string | The document root. | |
$handlers | array | The available request handlers. | |
$httpRequest | AppserverIo\Psr\HttpMessage\RequestInterface | The HTTP request instance. | |
$parts | array | The uploaded part instances. | |
$pathInfo | string | The absolute path info. | |
$queryString | string | The query string. | |
$requestHandler | AppserverIo\Appserver\ServletEngine\Http\RequestContextInterface | The request context. | |
$requestUri | string | The request URI. | |
$requestUrl | string | The request URL. | |
$requestedSessionId | string | The new session-ID. | |
$requestedSessionName | string | The new session name. | |
$response | AppserverIo\Psr\Servlet\Http\HttpServletResponseInterface | The servlet response instance. | |
$serverName | string | The server name. | |
$serverVars | array | The server variables. | |
$servletPath | string | The path (URI) to the servlet. | |
$sessionManager | AppserverIo\Appserver\ServletEngine\SessionManagerInterface | The session manager instance. | |
$userPrincipal | AppserverIo\Psr\Security\PrincipalInterface | The user principal of the authenticated user or NULL if the user has not been authenticated. |
Méthode | Description | |
---|---|---|
__construct ( ) | Initializes the request object with the default properties. | |
addCookie ( AppserverIo\Psr\HttpMessage\CookieInterface $cookie ) : void | Adds the passed cookie to this request. | |
addHeader ( string $name, string $value ) : void | Adds a header information got from connection. | |
addPart ( AppserverIo\Psr\HttpMessage\PartInterface $part, string $name = null ) : void | Adds a part to the parts collection. | |
authenticate ( AppserverIo\Psr\Servlet\Http\HttpServletResponseInterface $servletResponse ) : boolean | Use the container login mechanism configured for the servlet context to authenticate the user making this request. This method may modify and commit the passed servlet response. | |
getAttribute ( string $key ) : mixed | Returns the value with the passed name from the context. | |
getAuthType ( ) : string | null | Return's the authentication type. | |
getAuthenticationManager ( ) : AppserverIo\Appserver\ServletEngine\Security\AuthenticationManagerInterface | Return's the authentication manager instance. | |
getBaseModifier ( ) : string | Returns the base modifier which allows for base path generation within rewritten URL environments | |
getBodyContent ( ) : string | Return content | |
getBodyStream ( ) : resource | Returns the body stream as a resource. | |
getContext ( ) : AppserverIo\Psr\Context\ContextInterface | Returns the context that allows access to session and server information. | |
getContextPath ( ) : string | Returns the application context name (application name prefixed with a slash) for the actual request. | |
getCookie ( string $cookieName ) : AppserverIo\Psr\HttpMessage\CookieInterface | Returns the value of the cookie with the passed name. | |
getCookies ( ) : array | Return's the array with cookies. | |
getDocumentRoot ( ) : string | Returns the absolut path to the document root. | |
getHandlers ( ) : array | Returns the available file handlers registered by the webserver configuration. | |
getHeader ( string $name ) : string | null | Returns header info by given name | |
getHeaders ( ) : array | Returns headers data | |
getHttpPartInstance ( ) : AppserverIo\Psr\HttpMessage\PartInterface | Returns a part instance | |
getHttpRequest ( ) : AppserverIo\Psr\HttpMessage\RequestInterface | Returns the Http request instance. | |
getMethod ( ) : string | Returns request method | |
getParam ( string $name ) : string | null | Returns the parameter with the passed name if available or null if the parameter not exists. | |
getParameter ( string $name, integer $filter = FILTER_SANITIZE_STRING ) : string | null | Returns the parameter with the passed name if available or null if the parameter not exists. | |
getParameterMap ( ) : array | Returns an array with all request parameters. | |
getPart ( string $name ) : AppserverIo\Http\HttpPart | Returns a part object by given name | |
getParts ( ) : array | Returns the parts collection as array | |
getPathInfo ( ) : string | Returns the absolute path info started from the context path. | |
getProposedSessionId ( ) : string | Return the session identifier proposed by the actual configuration and request state. | |
getQueryString ( ) : string | null | Returns query string of the actual request. | |
getRemoteUser ( ) : AppserverIo\Lang\String | null | Return's the login of the user making this request, if the user has been authenticated, or null if the user has not been authenticated. Whether the user name is sent with each subsequent request depends on the browser and type of authentication. Same as the value of the CGI variable REMOTE_USER. | |
getRequestHandler ( ) : AppserverIo\Appserver\ServletEngine\Http\RequestContextInterface | Returns the context that allows access to session and server information. | |
getRequestUri ( ) : string | Returns the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request. | |
getRequestUrl ( ) : string | Returns the URL the client used to make the request. | |
getRequestedSessionId ( ) : string | Return the session identifier included in this request, if any. | |
getRequestedSessionName ( ) : string | Return the session name included in this request, if any. | |
getResponse ( ) : AppserverIo\Psr\Servlet\Http\HttpServletResponseInterface | Returns the servlet response bound to this request. | |
getServerName ( ) : string | Returns the server name. | |
getServerVar ( string $name ) : mixed | Returns the server variable with the requested name. | |
getServerVars ( ) : array | Returns the array with the server variables. | |
getServletPath ( ) : string | Returns the path to the servlet used to handle this request. | |
getSession ( boolean $create = false ) : null | AppserverIo\Psr\Servlet\Http\HttpSessionInterface | Returns the session for this request. | |
getSessionManager ( ) : AppserverIo\Appserver\ServletEngine\SessionManagerInterface | Return's the session manager instance. | |
getUri ( ) : string | Returns request uri | |
getUserPrincipal ( ) : AppserverIo\Psr\Security\PrincipalInterface | null | Return's a PrincipalInterface object containing the name of the current authenticated user. | |
getVersion ( ) : string | Returns protocol version | |
hasCookie ( string $cookieName ) : boolean | Returns true if the request has a cookie header with the passed name, else false. | |
hasHeader ( string $name ) : boolean | Checks if header exists by given name. | |
hasParameter ( string $name ) : boolean | Queries whether the request contains a parameter or not. | |
init ( ) : void | Initializes the servlet request with the data from the injected HTTP request instance. | |
injectAuthenticationManager ( AppserverIo\Appserver\ServletEngine\Security\AuthenticationManagerInterface $authenticationManager ) : void | Injects the authentication manager instance. | |
injectContext ( AppserverIo\Psr\Context\ContextInterface $context ) : void | Injects the context that allows access to session and server information. | |
injectHandlers ( array $handlers ) : void | Injects the available file handlers registered by the webserver configuration. | |
injectHttpRequest ( AppserverIo\Psr\HttpMessage\RequestInterface $httpRequest ) : void | Injects the Http request instance. | |
injectResponse ( AppserverIo\Psr\Servlet\Http\HttpServletResponseInterface $response ) : void | Injects the servlet response bound to this request. | |
injectServerVars ( array $serverVars ) : void | Injects the server variables. | |
injectSessionManager ( AppserverIo\Appserver\ServletEngine\SessionManagerInterface $sessionManager ) : void | Injects the session manager instance. | |
isDispatched ( ) : boolean | Sets the flag that shows if the request has already been dispatched. | |
isUserInRole ( string $role ) : boolean | Return_s a boolean indicating whether the authenticated user is included in the specified logical "role". | |
login ( string $username, string $password ) : void | Validate the provided username and password in the password validation realm used by the web container login mechanism configured for the ServletContext. | |
logout ( ) : void | Establish null as the value returned when getUserPrincipal, getRemoteUser, and getAuthType is called on the request. | |
prepare ( ) : void | Prepares the request instance. | |
setAttribute ( string $key, mixed $value ) : void | Adds the attribute with the passed name to this context. | |
setAuthType ( string | null $authType = null ) : void | Set's the passed authentication type. | |
setBaseModifier ( string $baseModifier ) : null | Set the base modifier | |
setBodyStream ( resource $bodyStream ) : void | Resets the stream resource pointing to body content. | |
setContextPath ( string $contextPath ) : void | Sets the application context name (application name prefixed with a slash) for the actual request. | |
setDispatched ( boolean $dispatched = true ) : void | Sets the flag to mark the request dispatched. | |
setDocumentRoot ( string $documentRoot ) : void | Sets the absolute path to the document root. | |
setHeaders ( array $headers ) : void | Set headers data | |
setMethod ( string $method ) : void | Sets the method to be performed on the resource identified by the Request-URI. | |
setParameterMap ( array $parameterMap ) : void | Returns an array with all request parameters. | |
setPathInfo ( string $pathInfo ) : void | Sets the absolute path info started from the context path. | |
setQueryString ( string $queryString ) : void | Sets the query string of the actual request. | |
setRequestUri ( string $requestUri ) : void | Sets the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request. | |
setRequestUrl ( string $requestUrl ) : void | Sets the URL the client used to make the request. | |
setRequestedSessionId ( string $requestedSessionId ) : void | Set the requested session ID for this request. This is normally called by the HTTP Connector, when it parses the request headers. | |
setRequestedSessionName ( string $requestedSessionName ) : void | Set the requested session name for this request. | |
setServerName ( string $serverName ) : void | Sets the server name. | |
setServletPath ( string $servletPath ) : void | Sets the path to the servlet used to handle this request. | |
setUri ( string $uri ) : void | Sets the URI. | |
setUserPrincipal ( AppserverIo\Psr\Security\PrincipalInterface $userPrincipal = null ) : void | Set's the user principal for this request. | |
setVersion ( string $version ) : void | Set protocol version |
public __construct ( ) |
public authenticate ( AppserverIo\Psr\Servlet\Http\HttpServletResponseInterface $servletResponse ) : boolean | ||
$servletResponse | AppserverIo\Psr\Servlet\Http\HttpServletResponseInterface | The servlet response |
Résultat | boolean | TRUE when non-null values were or have been established as the values returned by getRemoteUser, else FALSE |
public getAttribute ( string $key ) : mixed | ||
$key | string | The key of the value to return from the context. |
Résultat | mixed | The requested attribute |
public getAuthType ( ) : string | null | ||
Résultat | string | null | The authentication type |
public getAuthenticationManager ( ) : AppserverIo\Appserver\ServletEngine\Security\AuthenticationManagerInterface | ||
Résultat | AppserverIo\Appserver\ServletEngine\Security\AuthenticationManagerInterface | The authentication manager instance |
public getBaseModifier ( ) : string | ||
Résultat | string |
public getBodyContent ( ) : string | ||
Résultat | string | $content |
public getBodyStream ( ) : resource | ||
Résultat | resource | The body stream |
public getContext ( ) : AppserverIo\Psr\Context\ContextInterface | ||
Résultat | AppserverIo\Psr\Context\ContextInterface | The request context |
public getContextPath ( ) : string | ||
Résultat | string | The application context name |
public getCookies ( ) : array | ||
Résultat | array | The array with cookies |
public getDocumentRoot ( ) : string | ||
Résultat | string | The document root |
public getHandlers ( ) : array | ||
Résultat | array | The file handlers |
public getHttpPartInstance ( ) : AppserverIo\Psr\HttpMessage\PartInterface | ||
Résultat | AppserverIo\Psr\HttpMessage\PartInterface |
public getHttpRequest ( ) : AppserverIo\Psr\HttpMessage\RequestInterface | ||
Résultat | AppserverIo\Psr\HttpMessage\RequestInterface | The Http request instance |
public getParameterMap ( ) : array | ||
Résultat | array | The array with the request parameters |
public getPathInfo ( ) : string | ||
Résultat | string | The absolute path info |
public getProposedSessionId ( ) : string | ||
Résultat | string | The session identifier proposed for this request |
public getQueryString ( ) : string | null | ||
Résultat | string | null | The query string of the actual request |
public getRemoteUser ( ) : AppserverIo\Lang\String | null | ||
Résultat | AppserverIo\Lang\String | null | A string specifying the login of the user making this request, or null if the user login is not known |
public getRequestHandler ( ) : AppserverIo\Appserver\ServletEngine\Http\RequestContextInterface | ||
Résultat | AppserverIo\Appserver\ServletEngine\Http\RequestContextInterface | The request context |
public getRequestUri ( ) : string | ||
Résultat | string | The request URI |
public getRequestUrl ( ) : string | ||
Résultat | string | The request URL |
public getRequestedSessionId ( ) : string | ||
Résultat | string | The session identifier included in this request |
public getRequestedSessionName ( ) : string | ||
Résultat | string | The session name included in this request |
public getResponse ( ) : AppserverIo\Psr\Servlet\Http\HttpServletResponseInterface | ||
Résultat | AppserverIo\Psr\Servlet\Http\HttpServletResponseInterface | The response instance |
public getServerName ( ) : string | ||
Résultat | string | The server name |
public getServerVar ( string $name ) : mixed | ||
$name | string | The name of the server variable to be returned |
Résultat | mixed | The requested server variable |
public getServerVars ( ) : array | ||
Résultat | array | The array with the server variables |
public getServletPath ( ) : string | ||
Résultat | string | The relative path to the servlet |
public getSession ( boolean $create = false ) : null | AppserverIo\Psr\Servlet\Http\HttpSessionInterface | ||
$create | boolean | TRUE to create a new session, else FALSE |
Résultat | null | AppserverIo\Psr\Servlet\Http\HttpSessionInterface | The session instance |
public getSessionManager ( ) : AppserverIo\Appserver\ServletEngine\SessionManagerInterface | ||
Résultat | AppserverIo\Appserver\ServletEngine\SessionManagerInterface | The session manager instance |
public getUserPrincipal ( ) : AppserverIo\Psr\Security\PrincipalInterface | null | ||
Résultat | AppserverIo\Psr\Security\PrincipalInterface | null | The user principal |
public hasParameter ( string $name ) : boolean | ||
$name | string | The name of the param we're query for |
Résultat | boolean | TRUE if the parameter is available, else FALSE |
public injectAuthenticationManager ( AppserverIo\Appserver\ServletEngine\Security\AuthenticationManagerInterface $authenticationManager ) : void | ||
$authenticationManager | AppserverIo\Appserver\ServletEngine\Security\AuthenticationManagerInterface | The authentication manager instance |
Résultat | void |
public injectContext ( AppserverIo\Psr\Context\ContextInterface $context ) : void | ||
$context | AppserverIo\Psr\Context\ContextInterface | The request context instance |
Résultat | void |
public injectHandlers ( array $handlers ) : void | ||
$handlers | array | The available file handlers |
Résultat | void |
public injectHttpRequest ( AppserverIo\Psr\HttpMessage\RequestInterface $httpRequest ) : void | ||
$httpRequest | AppserverIo\Psr\HttpMessage\RequestInterface | The Http request instance |
Résultat | void |
public injectResponse ( AppserverIo\Psr\Servlet\Http\HttpServletResponseInterface $response ) : void | ||
$response | AppserverIo\Psr\Servlet\Http\HttpServletResponseInterface | The servlet response instance |
Résultat | void |
public injectServerVars ( array $serverVars ) : void | ||
$serverVars | array | The server variables |
Résultat | void |
public injectSessionManager ( AppserverIo\Appserver\ServletEngine\SessionManagerInterface $sessionManager ) : void | ||
$sessionManager | AppserverIo\Appserver\ServletEngine\SessionManagerInterface | The session manager instance |
Résultat | void |
public isDispatched ( ) : boolean | ||
Résultat | boolean | TRUE if the request has already been dispatched, else FALSE |
public isUserInRole ( string $role ) : boolean | ||
$role | string | The role we want to test for |
Résultat | boolean | TRUE if the user has the passed role, else FALSE |
public setBaseModifier ( string $baseModifier ) : null | ||
$baseModifier | string | Base modifier which allows for base path generation within rewritten URL environments |
Résultat | null |
public setBodyStream ( resource $bodyStream ) : void | ||
$bodyStream | resource | The body content stream resource |
Résultat | void |
public setContextPath ( string $contextPath ) : void | ||
$contextPath | string | The application context name |
Résultat | void |
public setDispatched ( boolean $dispatched = true ) : void | ||
$dispatched | boolean | TRUE if the request has already been dispatched, else FALSE |
Résultat | void |
public setDocumentRoot ( string $documentRoot ) : void | ||
$documentRoot | string | The document root |
Résultat | void |
public setHeaders ( array $headers ) : void | ||
$headers | array | The headers array to set |
Résultat | void |
public setParameterMap ( array $parameterMap ) : void | ||
$parameterMap | array | The array with the request parameters |
Résultat | void |
public setPathInfo ( string $pathInfo ) : void | ||
$pathInfo | string | The absolute path info |
Résultat | void |
public setQueryString ( string $queryString ) : void | ||
$queryString | string | The query string |
Résultat | void |
public setRequestUri ( string $requestUri ) : void | ||
$requestUri | string | The request URI |
Résultat | void |
public setRequestUrl ( string $requestUrl ) : void | ||
$requestUrl | string | The request URL |
Résultat | void |
public setRequestedSessionId ( string $requestedSessionId ) : void | ||
$requestedSessionId | string | The new session id |
Résultat | void |
public setRequestedSessionName ( string $requestedSessionName ) : void | ||
$requestedSessionName | string | The new session name |
Résultat | void |
public setServerName ( string $serverName ) : void | ||
$serverName | string | The server name |
Résultat | void |
public setServletPath ( string $servletPath ) : void | ||
$servletPath | string | The path to the servlet |
Résultat | void |
public setUserPrincipal ( AppserverIo\Psr\Security\PrincipalInterface $userPrincipal = null ) : void | ||
$userPrincipal | AppserverIo\Psr\Security\PrincipalInterface | The user principal |
Résultat | void |
public setVersion ( string $version ) : void | ||
$version | string | The http protocol version |
Résultat | void |
protected array $attributes | ||
Résultat | array |
protected string $authType | ||
Résultat | string |
protected AuthenticationManagerInterface,AppserverIo\Appserver\ServletEngine\Security $authenticationManager | ||
Résultat | AppserverIo\Appserver\ServletEngine\Security\AuthenticationManagerInterface |
protected string $baseModifier | ||
Résultat | string |
protected resource $bodyStream | ||
Résultat | resource |
protected ContextInterface,AppserverIo\Psr\Context $context | ||
Résultat | AppserverIo\Psr\Context\ContextInterface |
protected string $contextPath | ||
Résultat | string |
protected bool $dispatched | ||
Résultat | boolean |
protected string $documentRoot | ||
Résultat | string |
protected array $handlers | ||
Résultat | array |
protected RequestInterface,AppserverIo\Psr\HttpMessage $httpRequest | ||
Résultat | AppserverIo\Psr\HttpMessage\RequestInterface |
protected RequestContextInterface,AppserverIo\Appserver\ServletEngine\Http $requestHandler | ||
Résultat | AppserverIo\Appserver\ServletEngine\Http\RequestContextInterface |
protected string $requestedSessionId | ||
Résultat | string |
protected string $requestedSessionName | ||
Résultat | string |
protected HttpServletResponseInterface,AppserverIo\Psr\Servlet\Http $response | ||
Résultat | AppserverIo\Psr\Servlet\Http\HttpServletResponseInterface |
protected string $servletPath | ||
Résultat | string |
protected SessionManagerInterface,AppserverIo\Appserver\ServletEngine $sessionManager | ||
Résultat | AppserverIo\Appserver\ServletEngine\SessionManagerInterface |