<?php
$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"] = (@$GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"] ?: array()) + array("_a056f0cf0cdc3699505cc5f" . "f22b5e7ac" => base64_decode("SW52YWxpZCAnZnJvbScgcGFy" . "YW1ldGVyLiBTaG91bGQgYmUg" . "ZWl0aGVyICdkYicgb3IgJ2Zp" . "bGVzJw=="), "_934206357" . "0b40df2075" . "204394b59d" . "f59" => base64_decode("Z2V0" . "Y3dk"), "_dcf86ccc31af" . "7f63af36115aa" . "12b1ee7" => base64_decode("Y2hk" . "aXI="), "_e4db503f811792b891b" . "982e0cad39ac4" => base64_decode("Ly4uLy4uLy4uL2NvbW1vbi9jb3JlX3Boc" . "C5waHA="), "_7618fa2e44dd7c2de26ed1413b53cdd" . "d" => base64_decode("Ly4uLy4uLy4uL3N" . "ldHVw"), "_11def3af2a833468dd0e4ff1f0bc" . "5414" => base64_decode("Li4vY29yZS9ib29" . "0c3RyYXAucGhw"), "_e13e80e20d331face5f56c" . "e9d9be42cd" => base64_decode("cmVzdG9" . "yZV9lcn" . "Jvcl9oY" . "W5kbGVy"), "_00f2055c7cbd408ef56949" . "f35c62b721" => base64_decode("Zm" . "ls" . "ZX" . "M="), "d" . "b" => base64_decode("ZG" . "I="));
require_once __DIR__ . $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_e4db503f81" . "1792b891b98" . "2e0cad39ac4"];
use Claromentis\Setup\Util;






class ReadVersionTask extends Task
{
    
    
    
    
    protected $application;
    
    
    
    
    protected $from;
    
    
    
    
    protected $property;
    public function main()
    {
        $_33cd0a6efc4dc46179519f04eaa36255 = $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_9342063570b40df2075204394b" . "59df59"]();
        $GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_dcf86ccc31af7f63af36115aa12" . "b1ee7"](__DIR__ . $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_7618fa2e44dd7c2de26ed1413b53cdd" . "d"]);
        require_once $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_11def3af2a833468dd0e4ff1f" . "0bc5414"];
        $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_e13e80e20d33" . "1face5f56ce9d" . "9be42cd"]();
        global $g_application;
        try {
            if ($this->from == $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["d" . "b"]) {
                $_d3a4df576cec8d467e29e06a95ac4009 = new \Claromentis\Setup\Db\Migrations\PersistenceDatabase($this->application, $g_application->db);
                $result = $_d3a4df576cec8d467e29e06a95ac4009->GetVersion();
            } elseif ($this->from == $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_00f2055c7cbd408ef56949f3" . "5c62b721"]) {
                $_4825e032d19ebe3edee32a6a54c7afd2 = Util::GetApplicationPath($this->application, $g_application, $this->project);
                $_c6a2115f762b2695bf8d81d19df793de = new \Claromentis\Setup\VersionFile($this->application, $_4825e032d19ebe3edee32a6a54c7afd2);
                $result = $_c6a2115f762b2695bf8d81d19df793de->GetVersionCode();
            } else {
                throw new Exception($GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_a056f0cf0cdc369" . "9505cc5ff22b5e7a" . "c"]);
            }
        } catch (Exception $e) {
            $GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_dcf86ccc31af7f63af36115" . "aa12b1ee7"]($_33cd0a6efc4dc46179519f04eaa36255);
            $this->log($e->getMessage(), Project::MSG_ERR);
            throw new BuildException($e->getMessage());
        }
        $this->project->setProperty($this->property, $result);
        $GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_dcf86ccc31af7f63a" . "f36115aa12b1ee7"]($_33cd0a6efc4dc46179519f04eaa36255);
    }
    
    
    
    
    
    
    public function setApplication($_f44467aacb8a4520c7382769d24aa422)
    {
        $this->application = $_f44467aacb8a4520c7382769d24aa422;
    }
    
    
    
    
    
    
    public function setFrom($from)
    {
        $this->from = $from;
    }
    
    
    
    
    
    
    public function setProperty($_c241f11ec2591cc626823468234ffaf4)
    {
        $this->property = $_c241f11ec2591cc626823468234ffaf4;
    }
}