protected function setFileProperties(): void
    {
        if (is_null($this->path)) {
            throw \AWonderPHP\FileWrapper\NullPropertyException::propertyIsNull('path');
        }
        date_default_timezone_set('UTC');
        $this->filesize = filesize($this->path);
        $this->timestamp = filemtime($this->path);
        $this->lastmod = preg_replace('/\+0000$/', 'GMT', date('r', $this->timestamp));
        $inode = fileinode($this->path);
        // The f4a24ef etc strings - my understand in that
        //  because of caching proxies, the Etag needs to be
        //  different for different types of transfer encoding
        //  (e.g. brotli, gzip, deflate) or content could be
        //  delivered to a client that the client can not
        //  decompress.
        // This class assumes only text files will potentially
        //  be further compressed when serving.
        $etagEnd = 'f4a24ef';
        if ($this->istext) {
            if (ini_get('zlib.output_compression')) {
                $accept = 'identity';
                if ($this->minify) {
                    $etagEnd = '3d';
                } else {
                    $etagEnd = '4c';
                }
                if (isset($this->REQHEADERS['accept-encoding'])) {
                    $T = trim(strtolower($this->REQHEADERS['accept-encoding']));
                    if (strpos($T, 'gzip') !== false) {
                        $accept = 'gzip';
                    } elseif (strpos($T, 'deflate') !== false) {
                        $accept = 'deflate';
                    }
                }
                switch ($accept) {
                    case 'gzip':
                        $etagEnd .= '7aa23';
                        break;
                    case 'deflate':
                        $etagEnd .= '98db4';
                        break;
                    default:
                        $etagEnd .= 'c41ca';
                }
            }
        }
        $this->etag = sprintf("%x-%x-%x-%s", $inode, $this->filesize, $this->timestamp, $etagEnd);
        try {
            $this->checkFullFile();
        } catch (\ErrorException $e) {
            error_log($e->getMessage());
            $this->internalError = true;
            return;
        }
    }
protected function setFileProperties(): void
    {
        if (is_null($this->path)) {
            throw \AWonderPHP\FileWrapper\NullPropertyException::propertyIsNull('path');
        }
        date_default_timezone_set('UTC');
        $this->filesize = filesize($this->path);
        $this->timestamp = filemtime($this->path);
        $this->lastmod = preg_replace('/\+0000$/', 'GMT', date('r', $this->timestamp));
        $inode = fileinode($this->path);
        // The f4a24ef etc strings - my understand in that
        //  because of caching proxies, the Etag needs to be
        //  different for different types of transfer encoding
        //  (e.g. brotli, gzip, deflate) or content could be
        //  delivered to a client that the client can not
        //  decompress.
        // This class assumes only text files will potentially
        //  be further compressed when serving.
        $etagEnd = 'f4a24ef';
        if ($this->istext) {
            if (ini_get('zlib.output_compression')) {
                $accept = 'identity';
                if ($this->minify) {
                    $etagEnd = '3d';
                } else {
                    $etagEnd = '4c';
                }
                if (isset($this->REQHEADERS['accept-encoding'])) {
                    $T = trim(strtolower($this->REQHEADERS['accept-encoding']));
                    if (strpos($T, 'gzip') !== false) {
                        $accept = 'gzip';
                    } elseif (strpos($T, 'deflate') !== false) {
                        $accept = 'deflate';
                    }
                }
                switch ($accept) {
                    case 'gzip':
                        $etagEnd .= '7aa23';
                        break;
                    case 'deflate':
                        $etagEnd .= '98db4';
                        break;
                    default:
                        $etagEnd .= 'c41ca';
                }
            }
        }
        $this->etag = sprintf("%x-%x-%x-%s", $inode, $this->filesize, $this->timestamp, $etagEnd);
        try {
            $this->checkFullFile();
        } catch (\ErrorException $e) {
            error_log($e->getMessage());
            $this->internalError = true;
            return;
        }
    }
protected function setFileProperties ( ) : void { if ( is_null ( $ this -> path ) ) { throw \ AWonderPHP \ FileWrapper \ NullPropertyException :: propertyIsNull ( 'path' ) ; } date_default_timezone_set ( 'UTC' ) ; $ this -> filesize = filesize ( $ this -> path ) ; $ this -> timestamp = filemtime ( $ this -> path ) ; $ this -> lastmod = preg_replace ( '/\+0000$/' , 'GMT' , date ( 'r' , $ this -> timestamp ) ) ; $ inode = fileinode ( $ this -> path ) ; // The f4a24ef etc strings - my understand in that //  because of caching proxies, the Etag needs to be //  different for different types of transfer encoding //  (e.g. brotli, gzip, deflate) or content could be //  delivered to a client that the client can not //  decompress. // This class assumes only text files will potentially //  be further compressed when serving. $ etagEnd = 'f4a24ef' ; if ( $ this -> istext ) { if ( ini_get ( 'zlib.output_compression' ) ) { $ accept = 'identity' ; if ( $ this -> minify ) { $ etagEnd = '3d' ; } else { $ etagEnd = '4c' ; } if ( isset ( $ this -> REQHEADERS [ 'accept-encoding' ] ) ) { $ T = trim ( strtolower ( $ this -> REQHEADERS [ 'accept-encoding' ] ) ) ; if ( strpos ( $ T , 'gzip' ) !== false ) { $ accept = 'gzip' ; } elseif ( strpos ( $ T , 'deflate' ) !== false ) { $ accept = 'deflate' ; } } switch ( $ accept ) { case 'gzip' : $ etagEnd .= '7aa23' ; break ; case 'deflate' : $ etagEnd .= '98db4' ; break ; default : $ etagEnd .= 'c41ca' ; } } } $ this -> etag = sprintf ( "%x-%x-%x-%s" , $ inode , $ this -> filesize , $ this -> timestamp , $ etagEnd ) ; try { $ this -> checkFullFile ( ) ; } catch ( \ ErrorException $ e ) { error_log ( $ e -> getMessage ( ) ) ; $ this -> internalError = true ; return ; } }
Sets class properties needed to generate a unique Etag and to serve the file.

@return void
Sets class properties needed to generate a unique Etag and to serve the file .