Exemplo n.º 1
0
 /**
  * @param \SMS\Model\Number $from
  * @param \SMS\Model\Number $to
  * @param \SMS\Model\Content $content
  * @return string
  */
 private function prepareUrl(Number $from, Number $to, Content $content)
 {
     $from = urlencode($from->getNumber());
     $to = urlencode($to->getNumber());
     $content = urlencode($content->getContent());
     $config = $this->facadeSMS->getFactory()->getServiceLocator()->get('Config');
     $format = "%s?username=%s&password=%s&to=%s&message=%s&from=%s";
     return sprintf($format, $config['smsapi']['url'], $config['smsapi']['username'], $config['smsapi']['password'], $to, $content, $from);
 }
Exemplo n.º 2
0
 /**
  * @param \SMS\Model\Number $from
  * @param \SMS\Model\Number $to
  * @param \SMS\Model\Content $content
  * @return string
  */
 private function prepareUrl(Number $from, Number $to, Content $content)
 {
     $from = urlencode($from->getNumber());
     $to = urlencode($to->getNumber());
     $content = urlencode($content->getContent());
     $config = $this->facadeSMS->getFactory()->getServiceLocator()->get('Config');
     $format = "%s?account=%s&login=%s&password=%s&from=%s&to=%s&message=%s&contentType=application/json";
     return sprintf($format, $config['ovhapi']['url'], $config['ovhapi']['account'], $config['ovhapi']['username'], $config['ovhapi']['password'], $config['ovhapi']['from'], $to, $content);
 }