Todaymade\Daux\Server\Server::__construct PHP Method

__construct() public method

public __construct ( Daux $daux )
$daux Todaymade\Daux\Daux
    public function __construct(Daux $daux)
    {
        $this->daux = $daux;
        $this->host = $_SERVER['HTTP_HOST'];
        // The path has a special treatment on windows, revert the slashes
        $dir = dirname($_SERVER['PHP_SELF']);
        $this->base_url = $_SERVER['HTTP_HOST'] . (DIRECTORY_SEPARATOR == '\\' ? str_replace('\\', '/', $dir) : $dir);
        $t = strrpos($this->base_url, '/index.php');
        if ($t != false) {
            $this->base_url = substr($this->base_url, 0, $t);
        }
        if (substr($this->base_url, -1) !== '/') {
            $this->base_url .= '/';
        }
    }