Blame view
sources/lib/private/migration/provider.php
1023 Bytes
|
03e52840d
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
<?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 );
}
/**
|
|
6d9380f96
|
20 |
* exports data for apps |
|
03e52840d
|
21 22 23 24 25 |
* @return array appdata to be exported */ abstract function export( ); /** |
|
6d9380f96
|
26 |
* imports data for the app |
|
03e52840d
|
27 28 29 30 31 |
* @return void */ abstract function import( ); /** |
|
6d9380f96
|
32 33 |
* sets the OC_Migration_Content object to $this->content * @param OC_Migration_Content $content a OC_Migration_Content object |
|
03e52840d
|
34 35 36 37 38 39 40 41 42 43 44 45 |
*/
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;
}
}
/**
|
|
6d9380f96
|
46 |
* returns the appid of the provider |
|
03e52840d
|
47 48 49 50 51 52 |
* @return string
*/
public function getID() {
return $this->id;
}
}
|