diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-02 00:21:11 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-02 00:21:11 +0200 |
commit | 7e9e23f2100f10bffd6ee5eaa6c1778b4a335676 (patch) | |
tree | 7f78366fa514bb444e466e7b2453c0b954382c18 /lib/private/migration/provider.php | |
parent | 0537960dccb5e9ef7e87d383304e09858d54557b (diff) | |
parent | 5ade595911261cf47cdad17deb4d1a013f523245 (diff) | |
download | nextcloud-server-7e9e23f2100f10bffd6ee5eaa6c1778b4a335676.tar.gz nextcloud-server-7e9e23f2100f10bffd6ee5eaa6c1778b4a335676.zip |
Merge branch 'master' into apache-auth-master
Diffstat (limited to 'lib/private/migration/provider.php')
-rw-r--r-- | lib/private/migration/provider.php | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/lib/private/migration/provider.php b/lib/private/migration/provider.php new file mode 100644 index 00000000000..234ab3351f3 --- /dev/null +++ b/lib/private/migration/provider.php @@ -0,0 +1,52 @@ +<?php +/** + * provides search functionalty + */ +abstract class OC_Migration_Provider{ + + protected $id=false; + protected $content=false; + protected $uid=false; + protected $olduid=false; + protected $appinfo=false; + + public function __construct( $appid ) { + // Set the id + $this->id = $appid; + OC_Migrate::registerProvider( $this ); + } + + /** + * @brief exports data for apps + * @return array appdata to be exported + */ + abstract function export( ); + + /** + * @brief imports data for the app + * @return void + */ + abstract function import( ); + + /** + * @brief sets the OC_Migration_Content object to $this->content + * @param $content a OC_Migration_Content object + */ + public function setData( $uid, $content, $info=null ) { + $this->content = $content; + $this->uid = $uid; + $id = $this->id; + if( !is_null( $info ) ) { + $this->olduid = $info->exporteduser; + $this->appinfo = $info->apps->$id; + } + } + + /** + * @brief returns the appid of the provider + * @return string + */ + public function getID() { + return $this->id; + } +} |