<?php
namespace Claromentis\Core\Imager;

$GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"] ?: array()) + array("_6137f6b1054c046b6733" . "dcd025f03c02" => base64_decode("aW" . "1n"), "_1fdd8f9b667" . "088592aae1b9" . "8bc28b864" => base64_decode("cm1kaXI" . "="));
use Claromentis\Core\Util\FilesystemUtil;




class ImagerFactory
{
    protected $driver;
    protected $temp_path;
    protected $temp_storages = [];
    public function __construct(Driver\Driver $_1689db965dcd5989e8faf51389aad5c4, string $_f1dd9b97aa06d34cdac8b3c1f48750d9)
    {
        $this->driver = $_1689db965dcd5989e8faf51389aad5c4;
        $this->temp_path = $_f1dd9b97aa06d34cdac8b3c1f48750d9;
    }
    public function __destruct()
    {
        foreach ($this->temp_storages as $_64cc3f0af0aeb2b004e7318ec5357113) {
            
            
            @$GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_1fdd8f9b667088592aae1b" . "98bc28b864"]($_64cc3f0af0aeb2b004e7318ec5357113);
        }
    }
    
    
    
    
    
    
    
    
    public function CreateFromFile(string $_93469c9375390f862eebb779f8b740e4) : Image
    {
        $_54faabe694dfa8d05dc6c0827a214f82 = $this->NewImage();
        $_54faabe694dfa8d05dc6c0827a214f82->SetSrcFile($_93469c9375390f862eebb779f8b740e4, false);
        return $_54faabe694dfa8d05dc6c0827a214f82;
    }
    protected function NewImage() : Image
    {
        global $g_application;
        
        
        $_3e9dd802f6570205386040c44f4fa34c = $g_application[FilesystemUtil::class];
        $_64cc3f0af0aeb2b004e7318ec5357113 = $_3e9dd802f6570205386040c44f4fa34c->CreateTempPath($this->temp_path, $GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_6137f6b105" . "4c046b6733d" . "cd025f03c02"]);
        $this->temp_storages[] = $_64cc3f0af0aeb2b004e7318ec5357113;
        return new Image($this->driver, $_64cc3f0af0aeb2b004e7318ec5357113);
    }
}