Sets the Site HTTPS Support attribute value.
@param string $https_support New value for attribute
@return CNabuDataObject Returns self instance to grant chained setters call.
975278
public function setHTTPSSupport(string $https_support = "F") : CNabuDataObject
    {
        if ($https_support === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$https_support")
            );
        }
        $this->setValue('nb_site_https_support', $https_support);
        
        return $this;
    }
196106
public function setCookie($name, $value = null, $expire = null,
                              $domainPath = null, $https = null, $httpOnly = null)
    {
        if (!$this->response) {
            return $this->getResponse()->setCookie($name, $value, $expire, $domainPath, $https, $httpOnly);
        }
        return parent::setCookie($name, $value, $expire, $domainPath, $https, $httpOnly);
    }
1226609
public function setDefaultTargetUseURI(string $default_target_use_uri = "N") : CNabuDataObject
    {
        if ($default_target_use_uri === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$default_target_use_uri")
            );
        }
        $this->setValue('nb_site_default_target_use_uri', $default_target_use_uri);
        
        return $this;
    }
1134304
protected function setCookie($name, $value = null, $expire = null, $domainPath = null, $https = null, $httpOnly = null)
    {
        return setcookie($name, $value, $expire, $domainPath, $https, $httpOnly);
    }
169155
public void setSSLPort() throws InstallationFailedException {
        Element httpsConnector =
                (Element) getDocument()
                        .selectSingleNode(HTTPS_CONNECTOR_XPATH);
        if (options.getBooleanValue(InstallOptions.SSL_AVAILABLE, true)) {
            if (httpsConnector == null) {
                Element service =
                        (Element) getDocument()
                                .selectSingleNode("/Server/Service[@name='Catalina']");
                httpsConnector = service.addElement("Connector");
                httpsConnector.addAttribute("maxThreads", "150");
                httpsConnector.addAttribute("minSpareThreads", "25");
                httpsConnector.addAttribute("maxSpareThreads", "75");
                httpsConnector.addAttribute("disableUploadTimeout", "true");
                httpsConnector.addAttribute("acceptCount", "100");
                httpsConnector.addAttribute("debug", "0");
                httpsConnector.addAttribute("scheme", "https");
                httpsConnector.addAttribute("secure", "true");
                httpsConnector.addAttribute("clientAuth", "false");
                httpsConnector.addAttribute("sslProtocol", "TLS");
            }
            httpsConnector.addAttribute("port", options
                    .getValue(InstallOptions.TOMCAT_SSL_PORT));
            httpsConnector.addAttribute("enableLookups", "true"); // supports client dns/fqdn in xacml authz policies

            String keystore = options.getValue(InstallOptions.KEYSTORE_FILE);
            if (keystore.equals(InstallOptions.INCLUDED)) {
                keystore = KEYSTORE_LOCATION;
            }

            addAttribute(httpsConnector,
                         "keystoreFile",
                         keystore,
                         InstallOptions.DEFAULT);
            addAttribute(httpsConnector,
                         "keystorePass",
                         options.getValue(InstallOptions.KEYSTORE_PASSWORD),
                         KEYSTORE_PASSWORD_DEFAULT);
            addAttribute(httpsConnector,
                         "keystoreType",
                         options.getValue(InstallOptions.KEYSTORE_TYPE),
                         KEYSTORE_TYPE_DEFAULT);

            // The redirectPort for the non-SSL connector should match the port on
            // the SSL connector, per:
            // http://tomcat.apache.org/tomcat-5.0-doc/ssl-howto.html
            Element httpConnector =
                    (Element) getDocument()
                            .selectSingleNode(HTTP_CONNECTOR_XPATH);
            if (httpConnector != null) {
                httpConnector.addAttribute("redirectPort", options
                        .getValue(InstallOptions.TOMCAT_SSL_PORT));
            } else {
                throw new InstallationFailedException("Unable to set server.xml SSL Port. XPath for Connector element failed.");
            }
        } else if (httpsConnector != null) {
            httpsConnector.getParent().remove(httpsConnector);
        }
    }
281288
private function setCurl($is_https = false)
    {
        // Init
        $this->curl = curl_init();
        // Sets basic parameters
        curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($this->curl, CURLOPT_TIMEOUT, isset($this->request->settings['timeout']) ? $this->request->settings['timeout'] : 100);
        // Set parameters to maintain cookies across sessions
        curl_setopt($this->curl, CURLOPT_COOKIESESSION, TRUE);
        curl_setopt($this->curl, CURLOPT_COOKIEFILE, '/tmp/cookies_file');
        curl_setopt($this->curl, CURLOPT_COOKIEJAR, '/tmp/cookies_file');
        curl_setopt($this->curl, CURLOPT_USERAGENT,
            'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7'
        );
        if ($is_https)
            $this->setSSL();
    }
709681
public function setPHPTrace(string $php_trace = "F") : CNabuDataObject
    {
        if ($php_trace === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$php_trace")
            );
        }
        $this->setValue('nb_site_target_php_trace', $php_trace);
        
        return $this;
    }
550224
public function setUseApps(string $use_apps = "F") : CNabuDataObject
    {
        if ($use_apps === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$use_apps")
            );
        }
        $this->setValue('nb_site_target_use_apps', $use_apps);
        
        return $this;
    }
1354426
public function setIgnorePolicies(string $ignore_policies = "F") : CNabuDataObject
    {
        if ($ignore_policies === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$ignore_policies")
            );
        }
        $this->setValue('nb_site_target_ignore_policies', $ignore_policies);
        
        return $this;
    }
952627
private static function format($https = null, $asset = false)
    {
        $root = static::base();

        if (!$asset) {
            $root .= '/' . Config::get('app.index');
        }

        // Unless $https is specified we set https for all secure links.
        if (is_null($https)) {
            $https = self::$isHttps;
        }

        // disable SSL on all framework generated links to make it more
        // convenient to work with the site while developing locally.
        if ($https && Config::get('ssl')) {
            return preg_replace('~http://~', 'https://', $root, 1);
        }

        return preg_replace('~https://~', 'http://', $root, 1);
    }
1143203
public function supportOldBrowsers($support = true)
    {
        if ($support) {
            $this->csp->enableOldBrowserSupport();
        } else {
            $this->csp->disableOldBrowserSupport();
        }

        return $this;
    }
446751
public function setSiteTargetSectionId(int $nb_site_target_section_id) : CNabuDataObject
    {
        if ($nb_site_target_section_id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$nb_site_target_section_id")
            );
        }
        $this->setValue('nb_site_target_section_id', $nb_site_target_section_id);
        
        return $this;
    }
211641
public function setAttachment(string $attachment = "F") : CNabuDataObject
    {
        if ($attachment === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$attachment")
            );
        }
        $this->setValue('nb_site_target_attachment', $attachment);
        
        return $this;
    }
38860
public function setDns02(string $dns_02) : CNabuDataObject
    {
        if ($dns_02 === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$dns_02")
            );
        }
        $this->setValue('nb_domain_zone_dns_02', $dns_02);
        
        return $this;
    }
1242247
public function setSiteTargetCTAId(int $nb_site_target_cta_id) : CNabuDataObject
    {
        if ($nb_site_target_cta_id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$nb_site_target_cta_id")
            );
        }
        $this->setValue('nb_site_target_cta_id', $nb_site_target_cta_id);
        
        return $this;
    }
1215502
public function setValidationStatus(string $validation_status = "F") : CNabuDataObject
    {
        if ($validation_status === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$validation_status")
            );
        }
        $this->setValue('nb_user_validation_status', $validation_status);
        
        return $this;
    }
177295
public function setSiteId(int $nb_site_id) : CNabuDataObject
    {
        if ($nb_site_id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$nb_site_id")
            );
        }
        $this->setValue('nb_site_id', $nb_site_id);
        
        return $this;
    }