public function migrateFrom($otherObject)
    {
        $otherObjectClass = get_class($otherObject);

        // same object no migrations needed
        if ($otherObjectClass === $this->className) {
            return $otherObject;
        }

        $versionPath = new VersionPathSearch($this->reader);
        $migrations = $versionPath->find($otherObjectClass, $this->className);

        if (count($migrations) === 0) {
            throw new VersionPathNotFoundException($otherObjectClass, $this->className);
        }

        foreach ($migrations as $migration) {
            $otherObject = $migration->action->run($otherObject, $this->options);
        }

        return $otherObject;
    }
public function migrateFrom($otherObject)
    {
        $otherObjectClass = get_class($otherObject);

        // same object no migrations needed
        if ($otherObjectClass === $this->className) {
            return $otherObject;
        }

        $versionPath = new VersionPathSearch($this->reader);
        $migrations = $versionPath->find($otherObjectClass, $this->className);

        if (count($migrations) === 0) {
            throw new VersionPathNotFoundException($otherObjectClass, $this->className);
        }

        foreach ($migrations as $migration) {
            $otherObject = $migration->action->run($otherObject, $this->options);
        }

        return $otherObject;
    }
public function migrateFrom ( $ otherObject ) { $ otherObjectClass = get_class ( $ otherObject ) ; // same object no migrations needed
 if ( $ otherObjectClass === $ this -> className ) { return $ otherObject ; } $ versionPath = new VersionPathSearch ( $ this -> reader ) ; $ migrations = $ versionPath -> find ( $ otherObjectClass , $ this -> className ) ; if ( count ( $ migrations ) === 0 ) { throw new VersionPathNotFoundException ( $ otherObjectClass , $ this -> className ) ; } foreach ( $ migrations as $ migration ) { $ otherObject = $ migration -> action -> run ( $ otherObject , $ this -> options ) ; } return $ otherObject ; }
Get object from other version.

@param mixed $otherObject  Object instance.

@throws Exception\VersionPathNotFoundException

@return mixed Migrated object.
Get object from other version .