protected function getTextContent(): bool
    {
        if (is_null($this->path)) {
            $this->sendInternalError();
            return false;
        }
        if (is_null($this->mime)) {
            $this->sendInternalError();
            return false;
        }
        $content = file_get_contents($this->path);
        if ($this->toUTF8) {
            try {
                $content = $this->cleanSource($content);
            } catch (\ErrorException $e) {
                error_log($e->getMessage());
                $this->sendInternalError();
                return false;
            }
        }
        if ($this->minify) {
            switch ($this->mime) {
                case "application/javascript":
                    $content=$this->jsminify($content);
                    break;
                case "text/css":
                    $content=$this->cssminify($content);
                    break;
                default:
                    $content=$this->textwordwrap($content);
                    break;
            }
        }
        $charset='';
        if (! is_null($this->charEnc)) {
            $charset='; charset=' . $this->charEnc;
        } elseif (function_exists('mb_detect_encoding')) {
            if ($ENC = mb_detect_encoding($content, $this->charsetlist, true)) {
                $charset='; charset=' . $ENC;
            }
        }
        header('Content-Type: ' . $this->mime . $charset);
        header_remove('X-Powered-By');
        print($content);
        return true;
    }