src/Middleware/InitStateMiddleware.php
public function getIsDomainMode(HTTPRequest $request)
    {
        // Don't act in domain mode if none exist
        if (!Domain::getCached()->exists()) {
            return false;
        }

        // Check environment for a forced override
        if (Environment::getEnv('SS_FLUENT_FORCE_DOMAIN')) {
            return true;
        }

        // Check config for a forced override
        if (FluentDirectorExtension::config()->get('force_domain')) {
            return true;
        }

        // Check if the current domain is included in the list of configured domains (default)
        return Domain::getCached()->filter('Domain', Director::host($request))->exists();
    }
public function getIsDomainMode(HTTPRequest $request)
    {
        // Don't act in domain mode if none exist
        if (!Domain::getCached()->exists()) {
            return false;
        }

        // Check environment for a forced override
        if (Environment::getEnv('SS_FLUENT_FORCE_DOMAIN')) {
            return true;
        }

        // Check config for a forced override
        if (FluentDirectorExtension::config()->get('force_domain')) {
            return true;
        }

        // Check if the current domain is included in the list of configured domains (default)
        return Domain::getCached()->filter('Domain', Director::host($request))->exists();
    }
public function getIsDomainMode ( HTTPRequest $ request ) { // Don't act in domain mode if none exist if ( ! Domain :: getCached ( ) -> exists ( ) ) { return false ; } // Check environment for a forced override if ( Environment :: getEnv ( 'SS_FLUENT_FORCE_DOMAIN' ) ) { return true ; } // Check config for a forced override if ( FluentDirectorExtension :: config ( ) -> get ( 'force_domain' ) ) { return true ; } // Check if the current domain is included in the list of configured domains (default) return Domain :: getCached ( ) -> filter ( 'Domain' , Director :: host ( $ request ) ) -> exists ( ) ; }
Determine whether the website is running in domain segmentation mode

@param  HTTPRequest $request
@return bool
Determine whether the website is running in domain segmentation mode