<?php
$GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"] = (@$GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"] ?: array()) + array("_00f2055c7cbd408ef56949f35c62b7" . "21" => base64_decode("ZmlsZXM" . "="), "_dcf86ccc3" . "1af7f63af3" . "6115aa12b1" . "ee7" => base64_decode("Y2" . "hk" . "aX" . "I="), "_e4db503f811792b891b982e0cad39ac" . "4" => base64_decode("Ly4uLy4uLy4uL2NvbW1vbi9j" . "b3JlX3BocC5waHA="), "_7618fa2e44dd7c2de2" . "6ed1413b53cddd" => base64_decode("Ly4uLy4uLy4uL3" . "NldHVw"), "_e13e80e20d331face5f56ce9" . "d9be42cd" => base64_decode("cmVzdG9yZV9lcnJvcl9o" . "YW5kbGVy"), "_a056f0cf0cdc3699505cc5ff" . "22b5e7ac" => base64_decode("SW52YWxpZCAnZnJvbScgcGFyYW1ldGVyLiBTaG91bGQgYm" . "UgZWl0aGVyICdkYicgb3IgJ2ZpbGVzJw=="), "d" . "b" => base64_decode("ZG" . "I="), "_9342063570b40d" . "f2075204394b59d" . "f59" => base64_decode("Z2V" . "0Y3" . "dk"), "_11def3af2a833468dd0e4" . "ff1f0bc5414" => base64_decode("Li4vY29yZ" . "S9ib290c3" . "RyYXAucGh" . "w"));
require_once __DIR__ . $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_e4db503f811792b891b982e0cad39ac" . "4"];
use Claromentis\Setup\Util;






class ReadVersionTask extends Task
{
    
    
    
    
    protected $application;
    
    
    
    
    protected $from;
    
    
    
    
    protected $property;
    public function main()
    {
        $_33cd0a6efc4dc46179519f04eaa36255 = $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_9342063570b40df207520439" . "4b59df59"]();
        $GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_dcf86ccc31af7f63af" . "36115aa12b1ee7"](__DIR__ . $GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_7618fa2e44dd7c2de26ed14" . "13b53cddd"]);
        require_once $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_11def3af2a833468dd0e4ff" . "1f0bc5414"];
        $GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_e13e80e20d331face5f56ce9d9be" . "42cd"]();
        global $g_application;
        try {
            if ($this->from == $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["d" . "b"]) {
                $_d3a4df576cec8d467e29e06a95ac4009 = new \Claromentis\Setup\Db\Migrations\PersistenceDatabase($this->application, $g_application->db);
                $result = $_d3a4df576cec8d467e29e06a95ac4009->GetVersion();
            } elseif ($this->from == $GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_00f2055c7cbd408" . "ef56949f35c62b72" . "1"]) {
                $_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"]["_a056f0cf0cdc3699505cc5" . "ff22b5e7ac"]);
            }
        } catch (Exception $e) {
            $GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["_dcf86ccc31af7f63af36115aa" . "12b1ee7"]($_33cd0a6efc4dc46179519f04eaa36255);
            $this->log($e->getMessage(), Project::MSG_ERR);
            throw new BuildException($e->getMessage());
        }
        $this->project->setProperty($this->property, $result);
        $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_dcf86ccc31af7f63af36115" . "aa12b1ee7"]($_33cd0a6efc4dc46179519f04eaa36255);
    }
    
    
    
    
    
    
    public function setApplication($_f44467aacb8a4520c7382769d24aa422)
    {
        $this->application = $_f44467aacb8a4520c7382769d24aa422;
    }
    
    
    
    
    
    
    public function setFrom($from)
    {
        $this->from = $from;
    }
    
    
    
    
    
    
    public function setProperty($_c241f11ec2591cc626823468234ffaf4)
    {
        $this->property = $_c241f11ec2591cc626823468234ffaf4;
    }
}