private function assetify(string $file, string $type, string $path): string
    {
        if (in_array(substr($file, 0, 1), ["'", '"'], true)) {
            $file = trim($file, "'\"");
        } else {
            return "{{ {$file} }}";
        }

        if (substr($file, 0, 8) === "https://") {
            return $file;
        }

        if (substr($file, 0, 7) === "http://") {
            return $file;
        }

        if (substr($file, 0, 1) !== "/") {
            $path = trim($path, "/");
            if (strlen($path) > 0) {
                $path = "/{$path}/";
            } else {
                $path = "/";
            }
            $file = $path . $file;
        }

        if (substr($file, (strlen($type) + 1) * -1) !== ".{$type}") {
            $file .= ".{$type}";
        }

        return $file;
    }
private function assetify(string $file, string $type, string $path): string
    {
        if (in_array(substr($file, 0, 1), ["'", '"'], true)) {
            $file = trim($file, "'\"");
        } else {
            return "{{ {$file} }}";
        }

        if (substr($file, 0, 8) === "https://") {
            return $file;
        }

        if (substr($file, 0, 7) === "http://") {
            return $file;
        }

        if (substr($file, 0, 1) !== "/") {
            $path = trim($path, "/");
            if (strlen($path) > 0) {
                $path = "/{$path}/";
            } else {
                $path = "/";
            }
            $file = $path . $file;
        }

        if (substr($file, (strlen($type) + 1) * -1) !== ".{$type}") {
            $file .= ".{$type}";
        }

        return $file;
    }
private function assetify ( string $ file , string $ type , string $ path ) : string { if ( in_array ( substr ( $ file , 0 , 1 ) , [ "'" , '"' ] , true ) ) { $ file = trim ( $ file , "'\"" ) ; } else { return "{{ {$file} }}" ; } if ( substr ( $ file , 0 , 8 ) === "https://" ) { return $ file ; } if ( substr ( $ file , 0 , 7 ) === "http://" ) { return $ file ; } if ( substr ( $ file , 0 , 1 ) !== "/" ) { $ path = trim ( $ path , "/" ) ; if ( strlen ( $ path ) > 0 ) { $ path = "/{$path}/" ; } else { $ path = "/" ; } $ file = $ path . $ file ; } if ( substr ( $ file , ( strlen ( $ type ) + 1 ) * - 1 ) !== ".{$type}" ) { $ file .= ".{$type}" ; } return $ file ; }
Convert a simple name into a full asset path.

@param string $file The simple file name
@param string $type The type of asset (css/js)
@param string $path The path the asset is stored at

@return string The full path to the asset
Convert a simple name into a full asset path .