protected function serveText(): bool
    {
        // move this to a class property in future FIXME
        $vary = array();
        if (is_null($this->request)) {
            $this->sendInternalError();
            return false;
        }
        if (is_null($this->etag)) {
            $this->sendInternalError();
            return false;
        }
        if ($this->attachment) {
            header('Content-Description: File Transfer');
            header('Content-Disposition: attachment; filename="' . $this->request . '"');
        }
        if ($this->maxage == 0) {
            header('Cache-Control: must-revalidate');
        } else {
            header('Cache-Control: max-age=' . $this->maxage);
        }
        header('Last-Modified: ' . $this->lastmod);
        header('ETag: "' . $this->etag . '"');
        if (ini_get('zlib.output_compression')) {
            $vary[] = 'Accept-Encoding';
        }
        if (! is_null($this->allowOrigin)) {
            if ($this->allowOrigin !== '*') {
                $vary[] = 'Origin';
            }
        }
        if (count($vary) > 0) {
            $string = 'Vary: ' . implode(',', $vary);
            header($string);
        }
        if (! is_null($this->allowOrigin)) {
            header('access-control-allow-origin: ' . $this->allowOrigin);
        }
        return $this->getTextContent();
    }
protected function serveText(): bool
    {
        // move this to a class property in future FIXME
        $vary = array();
        if (is_null($this->request)) {
            $this->sendInternalError();
            return false;
        }
        if (is_null($this->etag)) {
            $this->sendInternalError();
            return false;
        }
        if ($this->attachment) {
            header('Content-Description: File Transfer');
            header('Content-Disposition: attachment; filename="' . $this->request . '"');
        }
        if ($this->maxage == 0) {
            header('Cache-Control: must-revalidate');
        } else {
            header('Cache-Control: max-age=' . $this->maxage);
        }
        header('Last-Modified: ' . $this->lastmod);
        header('ETag: "' . $this->etag . '"');
        if (ini_get('zlib.output_compression')) {
            $vary[] = 'Accept-Encoding';
        }
        if (! is_null($this->allowOrigin)) {
            if ($this->allowOrigin !== '*') {
                $vary[] = 'Origin';
            }
        }
        if (count($vary) > 0) {
            $string = 'Vary: ' . implode(',', $vary);
            header($string);
        }
        if (! is_null($this->allowOrigin)) {
            header('access-control-allow-origin: ' . $this->allowOrigin);
        }
        return $this->getTextContent();
    }
protected function serveText ( ) : bool { // move this to a class property in future FIXME $ vary = array ( ) ; if ( is_null ( $ this -> request ) ) { $ this -> sendInternalError ( ) ; return false ; } if ( is_null ( $ this -> etag ) ) { $ this -> sendInternalError ( ) ; return false ; } if ( $ this -> attachment ) { header ( 'Content-Description: File Transfer' ) ; header ( 'Content-Disposition: attachment; filename="' . $ this -> request . '"' ) ; } if ( $ this -> maxage == 0 ) { header ( 'Cache-Control: must-revalidate' ) ; } else { header ( 'Cache-Control: max-age=' . $ this -> maxage ) ; } header ( 'Last-Modified: ' . $ this -> lastmod ) ; header ( 'ETag: "' . $ this -> etag . '"' ) ; if ( ini_get ( 'zlib.output_compression' ) ) { $ vary [ ] = 'Accept-Encoding' ; } if ( ! is_null ( $ this -> allowOrigin ) ) { if ( $ this -> allowOrigin !== '*' ) { $ vary [ ] = 'Origin' ; } } if ( count ( $ vary ) > 0 ) { $ string = 'Vary: ' . implode ( ',' , $ vary ) ; header ( $ string ) ; } if ( ! is_null ( $ this -> allowOrigin ) ) { header ( 'access-control-allow-origin: ' . $ this -> allowOrigin ) ; } return $ this -> getTextContent ( ) ; }
Serves text content.

@return bool True on success, False on failure.
Serves text content .