<?php
namespace Claromentis\Core\Http;

$GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"] ?: array()) + array("_153f1c47790a7ec183fd740" . "2bae8f4a0" => base64_decode("ZnNlZ" . "Ws="), "_f6336d003f3b642897c63df2aff" . "25dd4" => base64_decode("ZnRlbG" . "w="), "_797ea62e9ab498d38c" . "2781088fc553f6" => base64_decode("dXJ" . "p"), "_b900ff57c02d0c496c3d0671e0c7a" . "b71" => base64_decode("aHR0cF9mdW5jdGlvbnMucG" . "hw"), "_ee692a983b23e08c19aafbf8af28677" . "0" => base64_decode("ZnBhc3" . "N0aHJ1"), "_4d707fab93bebb00bb" . "e69e8159697c90" => base64_decode(""), "_49c6565477ee9f822b499" . "a53e6d2995f" => base64_decode("YXJyYXlfa2V5X2V4a" . "XN0cw=="), "_aa19f39560a4" . "1402209bf532d" . "1544744" => base64_decode("c2VuZEhlYWRlcnNEb3du" . "bG9hZA=="), "_4889ace8690fa1f13d39705d28b4" . "c396" => base64_decode("c3RyZWFtX2dldF" . "9tZXRhX2RhdGE="));
use Symfony\Component\HttpFoundation\Response;







class FileStreamResponse extends Response
{
    const INLINE = 'inline';
    const DOWNLOAD = 'attachment';
    protected $file_name;
    protected $stream;
    protected $disposition;
    protected $mime_type;
    protected $last_modified;
    protected $is_protected;
    protected $cache_ttl;
    protected $file_size;
    
    
    
    
    
    
    
    
    
    public function __construct($_1cc5aa2f679b575f82786a73f0da28f8, $file_name, $_4b83d26c5eb0d93a0b377ff582df05e0 = false, $_655a561f4e34bbdfa745dc13393471b3 = '')
    {
        parent::__construct();
        $this->file_name = $file_name;
        $this->stream = $_1cc5aa2f679b575f82786a73f0da28f8;
        $this->disposition = $_4b83d26c5eb0d93a0b377ff582df05e0 ? self::DOWNLOAD : self::INLINE;
        $this->mime_type = $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_4d707fab93bebb00" . "bbe69e8159697c90"];
        $this->last_modified = 0;
        $this->is_protected = 1;
        $this->cache_ttl = 604800;
        
        
        $this->file_size = 0;
    }
    
    
    
    
    
    
    public function SetMimeType($_655a561f4e34bbdfa745dc13393471b3)
    {
        $this->mime_type = $_655a561f4e34bbdfa745dc13393471b3;
        return $this;
    }
    
    
    
    
    
    
    public function SetFileLastModified($_7608a2690229dd26ac43cb60aa2a7d97)
    {
        $this->last_modified = $_7608a2690229dd26ac43cb60aa2a7d97;
        return $this;
    }
    
    
    
    
    
    
    public function SetIsProtected($_fb01886968e6069b1e01895aab49a296)
    {
        $this->is_protected = (bool) $_fb01886968e6069b1e01895aab49a296;
        return $this;
    }
    
    
    
    
    
    
    public function SetCacheTTL($_3eda9235d1e262356cb51c8c4f40b84b)
    {
        $this->cache_ttl = $_3eda9235d1e262356cb51c8c4f40b84b;
        return $this;
    }
    
    
    
    
    
    
    public function SetFileSize($size)
    {
        $this->file_size = $size;
        return $this;
    }
    public function sendHeaders()
    {
        if ($this->file_size == 0) {
            $_2cc1b85bbc9f36a91e2f3d508cf9bf8d = @$GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_f6336d003f3b642897c63df2a" . "ff25dd4"]($this->stream);
            if ($_2cc1b85bbc9f36a91e2f3d508cf9bf8d !== false) {
                $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_153f1c47790a7ec1" . "83fd7402bae8f4a0"]($this->stream, 0, SEEK_END);
                $_827a4ce5f334e525c32838c58787f831 = $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_f6336d003f3b642897" . "c63df2aff25dd4"]($this->stream);
                $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_153f1c47790a7ec" . "183fd7402bae8f4a" . "0"]($this->stream, $_2cc1b85bbc9f36a91e2f3d508cf9bf8d, SEEK_SET);
                $this->file_size = $_827a4ce5f334e525c32838c58787f831 - $_2cc1b85bbc9f36a91e2f3d508cf9bf8d;
            }
        }
        require_once $GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_b900ff57c02d0c496c3d0671e0c7ab" . "71"];
        $GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_aa19f39560a41402209bf532d1544" . "744"]($this->file_name, $this->disposition, $this->mime_type, $this->file_size, $this->last_modified, $this->cache_ttl, $this->is_protected);
        return $this;
    }
    public function sendContent()
    {
        $GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_ee692a983b23e08c" . "19aafbf8af286770"]($this->stream);
        return $this;
    }
    public function GetPath()
    {
        $_aac291547a403778eb6591995cbc2db9 = $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_4889ace8690fa1f13d39705d28b4c3" . "96"]($this->stream);
        if ($GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_49c6565477ee9f822b499a53e6" . "d2995f"]($GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_797ea62e9ab498d38c" . "2781088fc553f6"], $_aac291547a403778eb6591995cbc2db9)) {
            return $_aac291547a403778eb6591995cbc2db9[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_797ea62e9ab498d38c2781088fc" . "553f6"]];
        } else {
            return null;
        }
    }
}