getCurrentVersion(); for ( $i = $current_version + 1; $i <= $this->getVersion(); $i ++ ) { $method = "update_{$i}"; if ( method_exists( $this, $method ) ) { $this->$method(); $this->setCurrentVersion( $i ); } } } }