AppserverIo\Appserver\ServletEngine\ServletManager::lookup PHP Method

lookup() public method

Runs a lookup for the servlet with the passed class name and session ID.
public lookup ( string $servletPath, string $sessionId = null, array $args = [] ) : AppserverIo\Psr\Servlet\GenericServlet
$servletPath string The servlet path
$sessionId string The session ID
$args array The arguments passed to the servlet constructor
return AppserverIo\Psr\Servlet\GenericServlet The requested servlet
    public function lookup($servletPath, $sessionId = null, array $args = array())
    {
        // load the servlet instance
        $instance = $this->getResourceLocator()->locate($this, $servletPath, $sessionId, $args);
        // inject the dependencies
        $dependencyInjectionContainer = $this->getApplication()->search('ProviderInterface');
        $dependencyInjectionContainer->injectDependencies($instance, $sessionId);
        // return the instance
        return $instance;
    }