DmitryDulepov\Realurl\Configuration\ConfigurationReader::setHostnames PHP Method

setHostnames() protected method

Sets host name variables.
protected setHostnames ( ) : void
return void
    protected function setHostnames()
    {
        if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'])) {
            if ($this->mode == self::MODE_DECODE) {
                $this->setHostnamesForDecoding();
            } else {
                $this->setHostnamesForEncoding();
            }
            if (substr($this->hostName, 0, 4) === 'www.') {
                $this->alternativeHostName = substr($this->hostName, 4);
            } elseif (substr_count($this->hostName, '.') === 1) {
                $this->alternativeHostName = 'www.' . $this->hostName;
            }
        }
    }