src/Versioned.php
public function compareVersions($from, $to)
    {
        $owner = $this->owner;
        $fromRecord = Versioned::get_version(get_class($owner), $owner->ID, $from);
        $toRecord = Versioned::get_version(get_class($owner), $owner->ID, $to);

        $diff = new DataDifferencer($fromRecord, $toRecord);

        return $diff->diffedData();
    }
public function compareVersions($from, $to)
    {
        $owner = $this->owner;
        $fromRecord = Versioned::get_version(get_class($owner), $owner->ID, $from);
        $toRecord = Versioned::get_version(get_class($owner), $owner->ID, $to);

        $diff = new DataDifferencer($fromRecord, $toRecord);

        return $diff->diffedData();
    }
public function compareVersions ( $ from , $ to ) { $ owner = $ this -> owner ; $ fromRecord = Versioned :: get_version ( get_class ( $ owner ) , $ owner -> ID , $ from ) ; $ toRecord = Versioned :: get_version ( get_class ( $ owner ) , $ owner -> ID , $ to ) ; $ diff = new DataDifferencer ( $ fromRecord , $ toRecord ) ; return $ diff -> diffedData ( ) ; }
Compare two version, and return the diff between them.

@param string $from The version to compare from.
@param string $to The version to compare to.

@return DataObject
Compare two version and return the diff between them .