public static function singleton(NamingDirectoryInterface $namingDirectory, GenericStackable $runlevels)
    {

        // query whether we already have an instance or not
        if (ApplicationServer::$instance == null) {
            // initialize and start the application server
            ApplicationServer::$instance = new ApplicationServer($namingDirectory, $runlevels);
            ApplicationServer::$instance->start();
        }

        // return the instance
        return ApplicationServer::$instance;
    }
public static function singleton(NamingDirectoryInterface $namingDirectory, GenericStackable $runlevels)
    {

        // query whether we already have an instance or not
        if (ApplicationServer::$instance == null) {
            // initialize and start the application server
            ApplicationServer::$instance = new ApplicationServer($namingDirectory, $runlevels);
            ApplicationServer::$instance->start();
        }

        // return the instance
        return ApplicationServer::$instance;
    }
public static function singleton ( NamingDirectoryInterface $ namingDirectory , GenericStackable $ runlevels ) { // query whether we already have an instance or not if ( ApplicationServer :: $ instance == null ) { // initialize and start the application server ApplicationServer :: $ instance = new ApplicationServer ( $ namingDirectory , $ runlevels ) ; ApplicationServer :: $ instance -> start ( ) ; } // return the instance return ApplicationServer :: $ instance ; }
Creates a new singleton application server instance.

@param \AppserverIo\Psr\Naming\NamingDirectoryInterface $namingDirectory The default naming directory
@param \AppserverIo\Storage\GenericStackable            $runlevels       The storage for the services

@return \AppserverIo\Psr\ApplicationServer\ApplicationServerInterface The singleton application instance
Creates a new singleton application server instance .