src/Analyzers/VersionAnalyzer.php
protected function run()
    {
        $versionString = rtrim($this->readHeaderRaw(8));
        $subVersion = round($this->readHeader('f', 4), 2);

        $version = $this->getVersion($versionString, $subVersion);

        $analysis = new Version($this->rec, $versionString, $subVersion);
        $analysis->version = $version;

        $analysis->isTrial = in_array($version, $this->trialVersions);
        $analysis->isAoK = in_array($version, $this->aokVersions);
        $analysis->isUserPatch = in_array($version, $this->userpatchVersions);
        $analysis->isUserPatch15 = $version === Version::VERSION_USERPATCH15;
        $analysis->isHDEdition = in_array($version, $this->hdVersions);
        $analysis->isHDPatch4 = $analysis->isHDEdition && $subVersion >= 12.00;
        $analysis->isAoC = $analysis->isUserPatch || $analysis->isHDEdition ||
            in_array($version, $this->aocVersions);

        $analysis->isMgl = $analysis->isAoK;
        $analysis->isMgx = $analysis->isAoC;
        $analysis->isMgz = $analysis->isUserPatch;
        // FIXME Not sure if this is the correct cutoff point.
        //
        // test/recs/versions/mgx2_simple.mgx2
        //    has subVersion == 12.31
        // test/recs/versions/MP Replay v4.3 @2015.09.11 221142 (2).msx
        //    has subVersion == 12.34
        // So it's somewhere between those two.
        $analysis->isMsx = $subVersion >= 12.32;
        $analysis->isAoe2Record = $subVersion >= 12.36;

        return $analysis;
    }
protected function run()
    {
        $versionString = rtrim($this->readHeaderRaw(8));
        $subVersion = round($this->readHeader('f', 4), 2);

        $version = $this->getVersion($versionString, $subVersion);

        $analysis = new Version($this->rec, $versionString, $subVersion);
        $analysis->version = $version;

        $analysis->isTrial = in_array($version, $this->trialVersions);
        $analysis->isAoK = in_array($version, $this->aokVersions);
        $analysis->isUserPatch = in_array($version, $this->userpatchVersions);
        $analysis->isUserPatch15 = $version === Version::VERSION_USERPATCH15;
        $analysis->isHDEdition = in_array($version, $this->hdVersions);
        $analysis->isHDPatch4 = $analysis->isHDEdition && $subVersion >= 12.00;
        $analysis->isAoC = $analysis->isUserPatch || $analysis->isHDEdition ||
            in_array($version, $this->aocVersions);

        $analysis->isMgl = $analysis->isAoK;
        $analysis->isMgx = $analysis->isAoC;
        $analysis->isMgz = $analysis->isUserPatch;
        // FIXME Not sure if this is the correct cutoff point.
        //
        // test/recs/versions/mgx2_simple.mgx2
        //    has subVersion == 12.31
        // test/recs/versions/MP Replay v4.3 @2015.09.11 221142 (2).msx
        //    has subVersion == 12.34
        // So it's somewhere between those two.
        $analysis->isMsx = $subVersion >= 12.32;
        $analysis->isAoe2Record = $subVersion >= 12.36;

        return $analysis;
    }
protected function run ( ) { $ versionString = rtrim ( $ this -> readHeaderRaw ( 8 ) ) ; $ subVersion = round ( $ this -> readHeader ( 'f' , 4 ) , 2 ) ; $ version = $ this -> getVersion ( $ versionString , $ subVersion ) ; $ analysis = new Version ( $ this -> rec , $ versionString , $ subVersion ) ; $ analysis -> version = $ version ; $ analysis -> isTrial = in_array ( $ version , $ this -> trialVersions ) ; $ analysis -> isAoK = in_array ( $ version , $ this -> aokVersions ) ; $ analysis -> isUserPatch = in_array ( $ version , $ this -> userpatchVersions ) ; $ analysis -> isUserPatch15 = $ version === Version :: VERSION_USERPATCH15 ; $ analysis -> isHDEdition = in_array ( $ version , $ this -> hdVersions ) ; $ analysis -> isHDPatch4 = $ analysis -> isHDEdition && $ subVersion >= 12.00 ; $ analysis -> isAoC = $ analysis -> isUserPatch || $ analysis -> isHDEdition || in_array ( $ version , $ this -> aocVersions ) ; $ analysis -> isMgl = $ analysis -> isAoK ; $ analysis -> isMgx = $ analysis -> isAoC ; $ analysis -> isMgz = $ analysis -> isUserPatch ; // FIXME Not sure if this is the correct cutoff point. // // test/recs/versions/mgx2_simple.mgx2 //    has subVersion == 12.31 // test/recs/versions/MP Replay v4.3 @2015.09.11 221142 (2).msx //    has subVersion == 12.34 // So it's somewhere between those two. $ analysis -> isMsx = $ subVersion >= 12.32 ; $ analysis -> isAoe2Record = $ subVersion >= 12.36 ; return $ analysis ; }
Read recorded game version metadata.

Recorded game version information is encoded as:
char version[8]; // something like "VER 9.C\0"
float subVersion;

@return object
Read recorded game version metadata .