當前位置: 首頁>>代碼示例>>PHP>>正文


PHP UploadFile::set_for_soap方法代碼示例

本文整理匯總了PHP中UploadFile::set_for_soap方法的典型用法代碼示例。如果您正苦於以下問題:PHP UploadFile::set_for_soap方法的具體用法?PHP UploadFile::set_for_soap怎麽用?PHP UploadFile::set_for_soap使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在UploadFile的用法示例。


在下文中一共展示了UploadFile::set_for_soap方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Note

 if (!empty($_REQUEST['parent_module'])) {
     $note = new Note();
     $note->name = $focus->name;
     if ($zuckerreports_config["debug"] == "yes") {
         $note->description = $focus->report_output;
     }
     $note->filename = $focus->report_result_name;
     if ($_REQUEST['parent_module'] == 'Contacts') {
         $note->contact_id = $_REQUEST['parent_id'];
     } else {
         $note->parent_type = $_REQUEST['parent_module'];
         $note->parent_id = $_REQUEST['parent_id'];
     }
     $note->save();
     $uf = new UploadFile("upload");
     $uf->set_for_soap($focus->report_result_name, file_get_contents($focus->report_result));
     $uf->stored_file_name = $uf->create_stored_filename();
     $uf->final_move($note->id);
     $note_url = "index.php?action=DetailView&module=Notes&record=" . $note->id . "&return_module=ZuckerReports&return_action=ReportOnDemand";
 }
 if (!empty($_REQUEST['send_email'])) {
     $mail = new SugarPHPMailer();
     $emails = split(",", $_REQUEST['send_email']);
     foreach ($emails as $email) {
         $mail->AddAddress($email);
     }
     $admin = new Administration();
     $admin->retrieveSettings();
     if ($admin->settings['mail_sendtype'] == "SMTP") {
         $mail->Mailer = "smtp";
         $mail->Host = $admin->settings['mail_smtpserver'];
開發者ID:aldridged,項目名稱:gtg-sugar,代碼行數:31,代碼來源:ReportOnDemand.php

示例2: createNote

 /**
  * Create a new Note object
  * @param array $data Note data
  * @param Email $email parent email
  */
 protected function createNote($data, $email)
 {
     require_once 'include/upload_file.php';
     $upload_file = new UploadFile('uploadfile');
     $decodedFile = base64_decode($data['content']);
     $upload_file->set_for_soap($data['filename'], $decodedFile);
     $ext_pos = strrpos($upload_file->stored_file_name, ".");
     $upload_file->file_ext = substr($upload_file->stored_file_name, $ext_pos + 1);
     $note = BeanFactory::getBean('Notes');
     $note->id = create_guid();
     $note->new_with_id = true;
     if (in_array($upload_file->file_ext, $this->config['upload_badext'])) {
         $upload_file->stored_file_name .= ".txt";
         $upload_file->file_ext = "txt";
     }
     $note->filename = $upload_file->get_stored_file_name();
     if (isset($data['type'])) {
         $note->file_mime_type = $data['type'];
     } else {
         $note->file_mime_type = $upload_file->getMimeSoap($note->filename);
     }
     $note->team_id = $email->team_id;
     $note->team_set_id = $email->team_set_id;
     $note->assigned_user_id = $email->assigned_user_id;
     $note->parent_type = 'Emails';
     $note->parent_id = $email->id;
     $note->name = $note->filename;
     $note->save();
     $upload_file->final_move($note->id);
 }
開發者ID:jglaine,項目名稱:sugar761-ent,代碼行數:35,代碼來源:SugarSNIP.php


注:本文中的UploadFile::set_for_soap方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。