<?php
$GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"] ?: array()) + array("_7618fa2e44dd7c2de26ed1" . "413b53cddd" => base64_decode("Ly4uLy4uLy4u" . "L3NldHVw"), "d" . "b" => base64_decode("ZGI" . "="), "_00f2055c7cbd408" . "ef56949f35c62b72" . "1" => base64_decode("Zmls" . "ZXM="), "_e13e80e20d331face5" . "f56ce9d9be42cd" => base64_decode("cmVzdG9yZV9lcnJvcl9" . "oYW5kbGVy"), "_11def3af2a833468dd0e4ff1f" . "0bc5414" => base64_decode("Li4vY29yZS" . "9ib290c3Ry" . "YXAucGhw"), "_dcf86ccc31af7f63af36115aa12b" . "1ee7" => base64_decode("Y2hka" . "XI="), "_a056f0cf0cdc3699505cc5ff22b" . "5e7ac" => base64_decode("SW52YWxpZCAnZnJvbScgcGFyYW1ldGVyLiBTaG91bGQgYmUgZWl0aGVyICdkYicgb3Ig" . "J2ZpbGVzJw=="), "_9342063570b40df2075204394b" . "59df59" => base64_decode("Z2" . "V0" . "Y3" . "dk"), "_e4db503f" . "811792b89" . "1b982e0ca" . "d39ac4" => base64_decode("Ly4uLy4uLy4uL2NvbW1vbi9jb3JlX3Bo" . "cC5waHA="));
require_once __DIR__ . $GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_e4db503f811792" . "b891b982e0cad39" . "ac4"];
use Claromentis\Setup\Util;






class ReadVersionTask extends Task
{
    
    
    
    
    protected $application;
    
    
    
    
    protected $from;
    
    
    
    
    protected $property;
    public function main()
    {
        $_33cd0a6efc4dc46179519f04eaa36255 = $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_9342063570b40df2075204" . "394b59df59"]();
        $GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_dcf86ccc31af7f63af36115aa1" . "2b1ee7"](__DIR__ . $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_7618fa2e44dd7c2de26ed1413b5" . "3cddd"]);
        require_once $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_11def3af2" . "a833468dd0" . "e4ff1f0bc5" . "414"];
        $GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_e13e80e20d331face5f56ce9" . "d9be42cd"]();
        global $g_application;
        try {
            if ($this->from == $GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["d" . "b"]) {
                $_d3a4df576cec8d467e29e06a95ac4009 = new \Claromentis\Setup\Db\Migrations\PersistenceDatabase($this->application, $g_application->db);
                $result = $_d3a4df576cec8d467e29e06a95ac4009->GetVersion();
            } elseif ($this->from == $GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_00f2055c7c" . "bd408ef5694" . "9f35c62b721"]) {
                $_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["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_a056f0cf0cdc369950" . "5cc5ff22b5e7ac"]);
            }
        } catch (Exception $e) {
            $GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_dcf86ccc31af7f63a" . "f36115aa12b1ee7"]($_33cd0a6efc4dc46179519f04eaa36255);
            $this->log($e->getMessage(), Project::MSG_ERR);
            throw new BuildException($e->getMessage());
        }
        $this->project->setProperty($this->property, $result);
        $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_dcf86ccc31af7f63af3611" . "5aa12b1ee7"]($_33cd0a6efc4dc46179519f04eaa36255);
    }
    
    
    
    
    
    
    public function setApplication($_f44467aacb8a4520c7382769d24aa422)
    {
        $this->application = $_f44467aacb8a4520c7382769d24aa422;
    }
    
    
    
    
    
    
    public function setFrom($from)
    {
        $this->from = $from;
    }
    
    
    
    
    
    
    public function setProperty($_c241f11ec2591cc626823468234ffaf4)
    {
        $this->property = $_c241f11ec2591cc626823468234ffaf4;
    }
}