'Zend_Service_DeveloperGarden_Response_SendSms_SendSMSResponse', 'sendFlashSMSResponse' => 'Zend_Service_DeveloperGarden_Response_SendSms_SendFlashSMSResponse' ); /** * this function creates the raw sms object that can be used to send an sms * or as flash sms * * @param string $number * @param string $message * @param string $originator * @param integer $account * * @return Zend_Service_DeveloperGarden_Request_SendSms_SendSMS */ public function createSms($number = null, $message = null, $originator = null, $account = null) { $request = new Zend_Service_DeveloperGarden_Request_SendSms_SendSMS($this->getEnvironment()); $request->setNumber($number) ->setMessage($message) ->setOriginator($originator) ->setAccount($account); return $request; } /** * this function creates the raw sms object that can be used to send an sms * or as flash sms * * @param string $number * @param string $message * @param string $originator * @param integer $account * * @return Zend_Service_DeveloperGarden_Request_SendSms_SendFlashSMS */ public function createFlashSms($number = null, $message = null, $originator = null, $account = null) { $request = new Zend_Service_DeveloperGarden_Request_SendSms_SendFlashSMS($this->getEnvironment()); $request->setNumber($number) ->setMessage($message) ->setOriginator($originator) ->setAccount($account); return $request; } /** * sends an sms with the given parameters * * @param Zend_Service_DeveloperGarden_Request_SendSms_SendSmsAbstract $sms * * @return Zend_Service_DeveloperGarden_Response_SendSms_SendSmsAbstract */ public function send(Zend_Service_DeveloperGarden_Request_SendSms_SendSmsAbstract $sms) { $client = $this->getSoapClient(); $request = array( 'request' => $sms ); switch ($sms->getSmsType()) { // Sms case 1 : $response = $client->sendSms($request); break; // flashSms case 2 : $response = $client->sendFlashSms($request); break; default : { #require_once 'Zend/Service/DeveloperGarden/Client/Exception.php'; throw new Zend_Service_DeveloperGarden_Client_Exception('Unknown SMS Type'); } } return $response->parse(); } }