2012-02-03 15:32:06 -05:00
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* provides search functionalty
|
|
|
|
|
*/
|
|
|
|
|
abstract class OC_Migrate_Provider{
|
2012-02-03 16:28:58 -05:00
|
|
|
|
2012-03-09 18:33:11 -05:00
|
|
|
public $id;
|
|
|
|
|
|
|
|
|
|
public function __construct( $appid ){
|
|
|
|
|
$this->id = $appid;
|
|
|
|
|
OC_Migrate::registerProvider( $this );
|
2012-02-03 15:32:06 -05:00
|
|
|
}
|
2012-03-09 18:33:11 -05:00
|
|
|
|
2012-02-03 15:32:06 -05:00
|
|
|
/**
|
2012-03-09 18:33:11 -05:00
|
|
|
* @breif exports data for apps
|
2012-02-03 15:32:06 -05:00
|
|
|
* @param string $uid
|
2012-03-03 12:30:21 -05:00
|
|
|
* @return array appdata to be exported
|
2012-02-03 15:32:06 -05:00
|
|
|
*/
|
|
|
|
|
abstract function export($uid);
|
|
|
|
|
|
|
|
|
|
/**
|
2012-03-09 18:33:11 -05:00
|
|
|
* @breif imports data for the app
|
2012-03-17 12:25:14 -04:00
|
|
|
* @param $appinfo object with the data that the app exported
|
2012-03-13 19:09:43 -04:00
|
|
|
* @param $info array of info including exportinfo.json
|
2012-03-03 12:30:21 -05:00
|
|
|
* @return void
|
2012-02-03 15:32:06 -05:00
|
|
|
*/
|
2012-03-17 12:25:14 -04:00
|
|
|
abstract function import( $appinfo, $info );
|
2012-02-03 15:32:06 -05:00
|
|
|
}
|