public function getPreviousVersion($from)
    {
        $lastTimestamp = 0;
        foreach (array_keys($this->versions) as $timestamp) {
            if ($timestamp == $from) {
                return $lastTimestamp;
            }
            $lastTimestamp = $timestamp;
        }

        return 0;
    }
public function getPreviousVersion($from)
    {
        $lastTimestamp = 0;
        foreach (array_keys($this->versions) as $timestamp) {
            if ($timestamp == $from) {
                return $lastTimestamp;
            }
            $lastTimestamp = $timestamp;
        }

        return 0;
    }
public function getPreviousVersion ( $ from ) { $ lastTimestamp = 0 ; foreach ( array_keys ( $ this -> versions ) as $ timestamp ) { if ( $ timestamp == $ from ) { return $ lastTimestamp ; } $ lastTimestamp = $ timestamp ; } return 0 ; }
Return the version before the given version.

@param string $from
Return the version before the given version .