<?php
|
|
/**
|
|
* SampleResult.php
|
|
* SampleResult model.
|
|
* @version 170424:1
|
|
* @author karminski <code.karminski@outlook.com>
|
|
*
|
|
* @changelogs
|
|
* 170424:1 INIT version.
|
|
*/
|
|
|
|
/**
|
|
* class SampleResult
|
|
*/
|
|
class SampleResult extends Result{
|
|
|
|
public $data;
|
|
public $doc;
|
|
public $r;
|
|
|
|
/**
|
|
* [importResultFromCache description]
|
|
* @param [type] &$resultData [description]
|
|
* @return [type] [description]
|
|
*/
|
|
public function importResultFromCache(&$resultData){
|
|
if(empty($resultData)) return false;
|
|
$this->data = json_decode($resultData, true);
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* [importFromSampleMongoDBStorageGet description]
|
|
* @param [type] &$doc [description]
|
|
* @return [type] [description]
|
|
*/
|
|
public function importFromSampleMongoDBStorageGet(&$doc){
|
|
if(empty($doc['uid'])) return false;
|
|
$this->doc = $doc;
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* [importFromSampleMySQLStorageGet description]
|
|
* @param [type] &$r [description]
|
|
* @return [type] [description]
|
|
*/
|
|
public function importFromSampleMySQLStorageGet(&$r){
|
|
if(empty($r)) return false;
|
|
$this->r = $r;
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* [exportForFeedback description]
|
|
* @param [type] &$feedData [description]
|
|
* @return [type] [description]
|
|
*/
|
|
public function exportForFeedback(&$feedData){
|
|
$feedData = $this->data;
|
|
return true;
|
|
}
|
|
|
|
}
|