PHP Class AppserverIo\Appserver\ServletEngine\ServletConfiguration

Inheritance: implements AppserverIo\Psr\Servlet\ServletConfigInterface
Show file Open project: appserver-io/appserver Class Usage Examples

Protected Properties

Property Type Description
$initParameter array Array with the servlet's init parameters found in the web.xml configuration file.
$servletContext AppserverIo\Psr\Servlet\ServletContextInterface The application instance.
$servletName string The servlets name from the web.xml configuration file.

Public Methods

Method Description
addInitParameter ( string $name, string $value ) : void Register's the init parameter under the passed name.
getAppBase ( ) : string Returns the path to the appserver webapp base directory.
getInitParameter ( string $name ) : string Return's the init parameter with the passed name.
getServletContext ( ) : AppserverIo\Psr\Servlet\ServletContextInterface Returns the servlet context instance.
getServletName ( ) : string Returns the servlet's name from the web.xml configuration file.
getWebappPath ( ) : string Returns the webapp base path.
injectServletContext ( AppserverIo\Psr\Servlet\ServletContextInterface $servletContext ) : void Initializes the servlet configuration with the servlet context instance.
injectServletName ( string $servletName ) : void Sets the servlet's Uname from the web.xml configuration file.

Method Details

addInitParameter() public method

Register's the init parameter under the passed name.
public addInitParameter ( string $name, string $value ) : void
$name string Name to register the init parameter with
$value string The value of the init parameter
return void

getAppBase() public method

Returns the path to the appserver webapp base directory.
public getAppBase ( ) : string
return string The path to the appserver webapp base directory

getInitParameter() public method

Return's the init parameter with the passed name.
public getInitParameter ( string $name ) : string
$name string Name of the init parameter to return
return string

getServletContext() public method

Returns the servlet context instance.
public getServletContext ( ) : AppserverIo\Psr\Servlet\ServletContextInterface
return AppserverIo\Psr\Servlet\ServletContextInterface The servlet context instance

getServletName() public method

Returns the servlet's name from the web.xml configuration file.
See also: AppserverIo\Psr\Servlet\ServletConfigInterface::getServletName()
public getServletName ( ) : string
return string The servlet name

getWebappPath() public method

Returns the webapp base path.
public getWebappPath ( ) : string
return string The webapp base path

injectServletContext() public method

Initializes the servlet configuration with the servlet context instance.
public injectServletContext ( AppserverIo\Psr\Servlet\ServletContextInterface $servletContext ) : void
$servletContext AppserverIo\Psr\Servlet\ServletContextInterface The servlet context instance
return void

injectServletName() public method

Sets the servlet's Uname from the web.xml configuration file.
public injectServletName ( string $servletName ) : void
$servletName string The servlet name
return void

Property Details

$initParameter protected property

Array with the servlet's init parameters found in the web.xml configuration file.
protected array $initParameter
return array

$servletContext protected property

The application instance.
protected ServletContextInterface,AppserverIo\Psr\Servlet $servletContext
return AppserverIo\Psr\Servlet\ServletContextInterface

$servletName protected property

The servlets name from the web.xml configuration file.
protected string $servletName
return string