private function locateHTTPServer()
    {
        $this->nb_http_server = null;

        if (self::isCLIEnvironment()) {
            throw new ENabuCoreException(ENabuCoreException::ERROR_METHOD_NOT_AVAILABLE, array(__METHOD__));
        } elseif ($this->nb_http_server === null) {
            $this->getHTTPServerPoolManager();
            $this->nb_provider_factory
                 ->getInterfaceDescriptors(CNabuProviderFactory::INTERFACE_HTTP_SERVER_SERVICE)
                 ->iterate(function(string $key, CNabuHTTPServerInterfaceDescriptor $descriptor) {
                     $nb_factory = $this->nb_http_server_pool_manager->getHTTPServerFactory($descriptor);
                     $nb_interface = $nb_factory->getInterface();
                     if ($nb_interface instanceof INabuHTTPServerInterface && $nb_interface->recognizeSoftware()) {
                         $this->nb_http_server = $nb_interface;
                         $this->callLocateHTTPServerHook();
                     }
                     return is_null($this->nb_http_server);
                 })
            ;
        }

        if (is_null($this->nb_http_server)) {
            throw new ENabuHTTPException(ENabuHTTPException::ERROR_HTTP_SERVER_PROVIDER_NOT_FOUND);
        }

        return $this->nb_http_server;
    }
private function locateHTTPServer()
    {
        $this->nb_http_server = null;

        if (self::isCLIEnvironment()) {
            throw new ENabuCoreException(ENabuCoreException::ERROR_METHOD_NOT_AVAILABLE, array(__METHOD__));
        } elseif ($this->nb_http_server === null) {
            $this->getHTTPServerPoolManager();
            $this->nb_provider_factory
                 ->getInterfaceDescriptors(CNabuProviderFactory::INTERFACE_HTTP_SERVER_SERVICE)
                 ->iterate(function(string $key, CNabuHTTPServerInterfaceDescriptor $descriptor) {
                     $nb_factory = $this->nb_http_server_pool_manager->getHTTPServerFactory($descriptor);
                     $nb_interface = $nb_factory->getInterface();
                     if ($nb_interface instanceof INabuHTTPServerInterface && $nb_interface->recognizeSoftware()) {
                         $this->nb_http_server = $nb_interface;
                         $this->callLocateHTTPServerHook();
                     }
                     return is_null($this->nb_http_server);
                 })
            ;
        }

        if (is_null($this->nb_http_server)) {
            throw new ENabuHTTPException(ENabuHTTPException::ERROR_HTTP_SERVER_PROVIDER_NOT_FOUND);
        }

        return $this->nb_http_server;
    }
private function locateHTTPServer ( ) { $ this -> nb_http_server = null ; if ( self :: isCLIEnvironment ( ) ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_METHOD_NOT_AVAILABLE , array ( __METHOD__ ) ) ; } elseif ( $ this -> nb_http_server === null ) { $ this -> getHTTPServerPoolManager ( ) ; $ this -> nb_provider_factory -> getInterfaceDescriptors ( CNabuProviderFactory :: INTERFACE_HTTP_SERVER_SERVICE ) -> iterate ( function ( string $ key , CNabuHTTPServerInterfaceDescriptor $ descriptor ) { $ nb_factory = $ this -> nb_http_server_pool_manager -> getHTTPServerFactory ( $ descriptor ) ; $ nb_interface = $ nb_factory -> getInterface ( ) ; if ( $ nb_interface instanceof INabuHTTPServerInterface && $ nb_interface -> recognizeSoftware ( ) ) { $ this -> nb_http_server = $ nb_interface ; $ this -> callLocateHTTPServerHook ( ) ; } return is_null ( $ this -> nb_http_server ) ; } ) ; } if ( is_null ( $ this -> nb_http_server ) ) { throw new ENabuHTTPException ( ENabuHTTPException :: ERROR_HTTP_SERVER_PROVIDER_NOT_FOUND ) ; } return $ this -> nb_http_server ; }
Try to detect the running HTTP Server attached to this process and returns their nabu-3 manager.
@return INabuHTTPServerInterface Returns an instance of the HTTP Server Engine.
@throws ENabuCoreException Throws an exception if Nabu Engine is not running in a HTTP Server mode.
@throws ENabuHTTPException Throws an exception if HTTP Server Provider is not found.
Try to detect the running HTTP Server attached to this process and returns their nabu - 3 manager .