private function createBuiltInSite()
    {
        $this->nb_customer = new CNabuBuiltInCustomer();
        $nb_site = new CNabuBuiltInSite();
        $nb_site_alias = new CNabuBuiltInSiteAlias();
        $nb_domain_zone = new CNabuBuiltInDomainZone();
        $nb_domain_zone_host = new CNabuBuiltInDomainZoneHost();

        $server_name = $this->nb_http_server->getServerName();
        $sname_parts = preg_split('/\\./', $server_name, 2);
        if (count($sname_parts) === 2) {
            list($host, $domain) = $sname_parts;
        } elseif (count($sname_parts) === 1) {
            $host = $sname_parts[0];
            $domain = '';
        } else {
            throw new ENabuCoreException(ENabuCoreException::ERROR_DOMAIN_ZONE_NOT_FOUND);
        }

        $nb_domain_zone->setName($domain);
        $nb_domain_zone_host->setName($host);
        $nb_domain_zone_host->setDomainZone($nb_domain_zone);

        $host_path = $this->nb_http_server->getHostBaseDirectory();
        $site_path = basename($host_path);

        $nb_site->setBasePath(DIRECTORY_SEPARATOR . $site_path);
        /** @source $nb_site->setPHPUtilsPath(NABU_PHPUTILS_FOLDER); */
        $nb_site->setClassesPath(NABU_CLASSES_FOLDER);
        $nb_site->setPluginsPath(NABU_PLUGINS_FOLDER);
        $nb_site->setMainAlias($nb_site_alias);

        $nb_site_alias->setDomainZoneHost($nb_domain_zone_host);

        $this->nb_http_server->setSite($nb_site);
        $this->nb_http_server->setSiteAlias($nb_site_alias);
    }
private function createBuiltInSite()
    {
        $this->nb_customer = new CNabuBuiltInCustomer();
        $nb_site = new CNabuBuiltInSite();
        $nb_site_alias = new CNabuBuiltInSiteAlias();
        $nb_domain_zone = new CNabuBuiltInDomainZone();
        $nb_domain_zone_host = new CNabuBuiltInDomainZoneHost();

        $server_name = $this->nb_http_server->getServerName();
        $sname_parts = preg_split('/\\./', $server_name, 2);
        if (count($sname_parts) === 2) {
            list($host, $domain) = $sname_parts;
        } elseif (count($sname_parts) === 1) {
            $host = $sname_parts[0];
            $domain = '';
        } else {
            throw new ENabuCoreException(ENabuCoreException::ERROR_DOMAIN_ZONE_NOT_FOUND);
        }

        $nb_domain_zone->setName($domain);
        $nb_domain_zone_host->setName($host);
        $nb_domain_zone_host->setDomainZone($nb_domain_zone);

        $host_path = $this->nb_http_server->getHostBaseDirectory();
        $site_path = basename($host_path);

        $nb_site->setBasePath(DIRECTORY_SEPARATOR . $site_path);
        /** @source $nb_site->setPHPUtilsPath(NABU_PHPUTILS_FOLDER); */
        $nb_site->setClassesPath(NABU_CLASSES_FOLDER);
        $nb_site->setPluginsPath(NABU_PLUGINS_FOLDER);
        $nb_site->setMainAlias($nb_site_alias);

        $nb_site_alias->setDomainZoneHost($nb_domain_zone_host);

        $this->nb_http_server->setSite($nb_site);
        $this->nb_http_server->setSiteAlias($nb_site_alias);
    }
private function createBuiltInSite ( ) { $ this -> nb_customer = new CNabuBuiltInCustomer ( ) ; $ nb_site = new CNabuBuiltInSite ( ) ; $ nb_site_alias = new CNabuBuiltInSiteAlias ( ) ; $ nb_domain_zone = new CNabuBuiltInDomainZone ( ) ; $ nb_domain_zone_host = new CNabuBuiltInDomainZoneHost ( ) ; $ server_name = $ this -> nb_http_server -> getServerName ( ) ; $ sname_parts = preg_split ( '/\\./' , $ server_name , 2 ) ; if ( count ( $ sname_parts ) === 2 ) { list ( $ host , $ domain ) = $ sname_parts ; } elseif ( count ( $ sname_parts ) === 1 ) { $ host = $ sname_parts [ 0 ] ; $ domain = '' ; } else { throw new ENabuCoreException ( ENabuCoreException :: ERROR_DOMAIN_ZONE_NOT_FOUND ) ; } $ nb_domain_zone -> setName ( $ domain ) ; $ nb_domain_zone_host -> setName ( $ host ) ; $ nb_domain_zone_host -> setDomainZone ( $ nb_domain_zone ) ; $ host_path = $ this -> nb_http_server -> getHostBaseDirectory ( ) ; $ site_path = basename ( $ host_path ) ; $ nb_site -> setBasePath ( DIRECTORY_SEPARATOR . $ site_path ) ; /** @source $nb_site->setPHPUtilsPath(NABU_PHPUTILS_FOLDER); */ $ nb_site -> setClassesPath ( NABU_CLASSES_FOLDER ) ; $ nb_site -> setPluginsPath ( NABU_PLUGINS_FOLDER ) ; $ nb_site -> setMainAlias ( $ nb_site_alias ) ; $ nb_site_alias -> setDomainZoneHost ( $ nb_domain_zone_host ) ; $ this -> nb_http_server -> setSite ( $ nb_site ) ; $ this -> nb_http_server -> setSiteAlias ( $ nb_site_alias ) ; }
Create the BuiltIn Site.
If operation mode is setted to Standalone, the BuiltIn Site is required due to the HTTP Server cannot execute
more than one application instance.
@return CNabuBuiltInSite Returns the BuiltIn Site instance created and filled with their default values.
Create the BuiltIn Site . If operation mode is setted to Standalone the BuiltIn Site is required due to the HTTP Server cannot execute more than one application instance .