server/lib/private/migration/provider.php
Scrutinizer Auto-Fixer adaee6a5a1 Scrutinizer Auto-Fixes
This patch was automatically generated as part of the following inspection:
https://scrutinizer-ci.com/g/owncloud/core/inspections/cdfecc4e-a37e-4233-8025-f0d7252a8720

Enabled analysis tools:
 - PHP Analyzer
 - JSHint
 - PHP Copy/Paste Detector
 - PHP PDepend
2014-02-19 09:31:54 +01:00

52 lines
1 KiB
PHP

<?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 OC_Migration_Content $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;
}
}