示例#1
0
 /**
  * Load remote file metadata
  *
  * @param	   string	$service	Service name (google or dropbox)
  * @param	   integer	$uid		User ID
  * @param	   string	$id			Remote ID
  *
  * @return	   string
  */
 public function loadRemoteResource($service = 'google', $uid = 0, $id = 0)
 {
     if (!$id) {
         return false;
     }
     $resource = NULL;
     // Get api
     $apiService = $this->getAPI($service, $uid);
     if (!$apiService) {
         $this->setError(Lang::txt('PLG_PROJECTS_FILES_SYNC_API_UNAVAILABLE'));
         return false;
     }
     if ($service == 'google') {
         $resource = Google::loadFile($apiService, $id);
     }
     return $resource;
 }