当前位置: 首页>>代码示例>>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;未经允许,请勿转载。