<?php
namespace Claromentis\Core\Http;

$GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"] ?: array()) + array("_8c6a777435f" . "1bfad5b57490" . "7c551c9f0" => base64_decode("WC1Db250ZW50LVR5cGUtT3B0aW9" . "ucw=="), "_633363f14d08aa7" . "b249a3691028fdb3" . "4" => base64_decode("Li4vY29tbW9uL2h0dHBfZnVuY3R" . "pb25zLnBocA=="), "_593a49c07" . "8b2740c1c8" . "55f85acbf4" . "c3e" => base64_decode("bm9" . "zbm" . "lmZ" . "g=="), "_e20b559a" . "1b414495c" . "43a4fbbf2" . "e5015e" => base64_decode("aHR0cF" . "9zZW5k" . "X2ZpbG" . "U="), "_4d707fab93bebb00bbe69e8159" . "697c90" => base64_decode(""));
use Symfony\Component\HttpFoundation\Response;




class FileResponse extends Response
{
    const INLINE = 'inline';
    const DOWNLOAD = 'attachment';
    protected $file_name;
    protected $file_path;
    protected $disposition;
    protected $mime_type;
    protected $last_modified;
    protected $is_protected;
    protected $cache_ttl;
    public function __construct($file_name, $_bb16fdceae82e78cd70e49ed63fa6f45, $_4b83d26c5eb0d93a0b377ff582df05e0 = false)
    {
        parent::__construct();
        $this->file_name = $file_name;
        $this->file_path = $_bb16fdceae82e78cd70e49ed63fa6f45;
        $this->disposition = $_4b83d26c5eb0d93a0b377ff582df05e0 ? self::DOWNLOAD : self::INLINE;
        $this->mime_type = $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_4d707fab93bebb00bbe69e815" . "9697c90"];
        $this->last_modified = 0;
        $this->is_protected = 1;
        $this->cache_ttl = 604800;
        
        
    }
    
    
    
    
    
    
    public function SetMimeType($_655a561f4e34bbdfa745dc13393471b3)
    {
        $this->mime_type = $_655a561f4e34bbdfa745dc13393471b3;
        return $this;
    }
    
    
    
    
    
    
    public function SetLastModified(\DateTimeInterface $_67a0d624aebcceb0abd5ce56a53ff06f = null) : object
    {
        $this->last_modified = $_67a0d624aebcceb0abd5ce56a53ff06f->getTimestamp();
        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 sendHeaders()
    {
        $this->headers->set($GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_8c6a77743" . "5f1bfad5b5" . "74907c551c" . "9f0"], $GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_593a49c078b2" . "740c1c855f85a" . "cbf4c3e"]);
        return $this;
    }
    public function sendContent()
    {
        \Claromentis\Core\Services::I()->session->save();
        require_once $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_633363f1" . "4d08aa7b2" . "49a369102" . "8fdb34"];
        $GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_e20b559a1b414495c" . "43a4fbbf2e5015e"]($this->file_name, $this->file_path, $this->disposition, $this->mime_type, $this->last_modified, $this->is_protected, $this->cache_ttl);
        return $this;
    }
    public function GetFilePath()
    {
        return $this->file_path;
    }
}