public function registerServlets(ApplicationInterface $application)
    {

        // load the object manager instance
        /** @var \AppserverIo\Psr\Di\ObjectManagerInterface $objectManager */
        $objectManager = $this->getApplication()->search(ObjectManagerInterface::IDENTIFIER);

        // register the beans located by annotations and the XML configuration
        /** \AppserverIo\Psr\Deployment\DescriptorInterface $objectDescriptor */
        foreach ($objectManager->getObjectDescriptors() as $descriptor) {
            // check if we've found a servlet descriptor and register the servlet
            if ($descriptor instanceof ServletDescriptorInterface) {
                $this->registerServlet($descriptor);
            }
        }
    }
public function registerServlets(ApplicationInterface $application)
    {

        // load the object manager instance
        /** @var \AppserverIo\Psr\Di\ObjectManagerInterface $objectManager */
        $objectManager = $this->getApplication()->search(ObjectManagerInterface::IDENTIFIER);

        // register the beans located by annotations and the XML configuration
        /** \AppserverIo\Psr\Deployment\DescriptorInterface $objectDescriptor */
        foreach ($objectManager->getObjectDescriptors() as $descriptor) {
            // check if we've found a servlet descriptor and register the servlet
            if ($descriptor instanceof ServletDescriptorInterface) {
                $this->registerServlet($descriptor);
            }
        }
    }
public function registerServlets ( ApplicationInterface $ application ) { // load the object manager instance /** @var \AppserverIo\Psr\Di\ObjectManagerInterface $objectManager */ $ objectManager = $ this -> getApplication ( ) -> search ( ObjectManagerInterface :: IDENTIFIER ) ; // register the beans located by annotations and the XML configuration /** \AppserverIo\Psr\Deployment\DescriptorInterface $objectDescriptor */ foreach ( $ objectManager -> getObjectDescriptors ( ) as $ descriptor ) { // check if we've found a servlet descriptor and register the servlet if ( $ descriptor instanceof ServletDescriptorInterface ) { $ this -> registerServlet ( $ descriptor ) ; } } }
Finds all servlets which are provided by the webapps and initializes them.

@param \AppserverIo\Psr\Application\ApplicationInterface $application The application instance

@return void

@throws \AppserverIo\Appserver\ServletEngine\InvalidServletMappingException
Finds all servlets which are provided by the webapps and initializes them .