@@ 522-536 (lines=15) @@ | ||
519 | return $this->sforce->upsert($arg)->result; |
|
520 | } |
|
521 | ||
522 | public function sendSingleEmail($request) { |
|
523 | if (is_array($request)) { |
|
524 | $messages = array(); |
|
525 | foreach ($request as $r) { |
|
526 | $email = new SoapVar($r, SOAP_ENC_OBJECT, 'SingleEmailMessage', $this->namespace); |
|
527 | array_push($messages, $email); |
|
528 | } |
|
529 | $arg = new stdClass(); |
|
530 | $arg->messages = $messages; |
|
531 | return $this->_sendEmail($arg); |
|
532 | } else { |
|
533 | $backtrace = debug_backtrace(); |
|
534 | die('Please pass in array to this function: '.$backtrace[0]['function']); |
|
535 | } |
|
536 | } |
|
537 | ||
538 | public function sendMassEmail($request) { |
|
539 | if (is_array($request)) { |
|
@@ 538-552 (lines=15) @@ | ||
535 | } |
|
536 | } |
|
537 | ||
538 | public function sendMassEmail($request) { |
|
539 | if (is_array($request)) { |
|
540 | $messages = array(); |
|
541 | foreach ($request as $r) { |
|
542 | $email = new SoapVar($r, SOAP_ENC_OBJECT, 'MassEmailMessage', $this->namespace); |
|
543 | array_push($messages, $email); |
|
544 | } |
|
545 | $arg = new stdClass(); |
|
546 | $arg->messages = $messages; |
|
547 | return $this->_sendEmail($arg); |
|
548 | } else { |
|
549 | $backtrace = debug_backtrace(); |
|
550 | die('Please pass in array to this function: '.$backtrace[0]['function']); |
|
551 | } |
|
552 | } |
|
553 | ||
554 | protected function _sendEmail($arg) { |
|
555 | $this->setHeaders(); |
@@ 124-137 (lines=14) @@ | ||
121 | * |
|
122 | * @param array $request |
|
123 | */ |
|
124 | public function sendSingleEmail($request) { |
|
125 | if (is_array($request)) { |
|
126 | $messages = array(); |
|
127 | foreach ($request as $r) { |
|
128 | $email = new SoapVar($r, SOAP_ENC_OBJECT, 'SingleEmailMessage', $this->namespace); |
|
129 | array_push($messages, $email); |
|
130 | } |
|
131 | $arg->messages = $messages; |
|
132 | return parent::_sendEmail($arg); |
|
133 | } else { |
|
134 | $backtrace = debug_backtrace(); |
|
135 | die('Please pass in array to this function: '.$backtrace[0]['function']); |
|
136 | } |
|
137 | } |
|
138 | ||
139 | /** |
|
140 | * |
|
@@ 143-156 (lines=14) @@ | ||
140 | * |
|
141 | * @param array $request |
|
142 | */ |
|
143 | public function sendMassEmail($request) { |
|
144 | if (is_array($request)) { |
|
145 | $messages = array(); |
|
146 | foreach ($request as $r) { |
|
147 | $email = new SoapVar($r, SOAP_ENC_OBJECT, 'MassEmailMessage', $this->namespace); |
|
148 | array_push($messages, $email); |
|
149 | } |
|
150 | $arg->messages = $messages; |
|
151 | return parent::_sendEmail($arg); |
|
152 | } else { |
|
153 | $backtrace = debug_backtrace(); |
|
154 | die('Please pass in array to this function: '.$backtrace[0]['function']); |
|
155 | } |
|
156 | } |
|
157 | ||
158 | /** |
|
159 | * Updates one or more new individual objects to your organization's data. |