本文整理汇总了PHP中Encryption::getEncryptedUrlFromUri方法的典型用法代码示例。如果您正苦于以下问题:PHP Encryption::getEncryptedUrlFromUri方法的具体用法?PHP Encryption::getEncryptedUrlFromUri怎么用?PHP Encryption::getEncryptedUrlFromUri使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Encryption
的用法示例。
在下文中一共展示了Encryption::getEncryptedUrlFromUri方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeViewEmail
public function executeViewEmail(sfWebRequest $request)
{
sfConfig::set('sf_web_debug', false);
$this->setLayout(false);
$reservation_id = $request->getParameter('id');
$template = $request->getParameter('template');
$type = $request->getParameter('type');
$reservation = Doctrine::getTable('Reservation')->find($reservation_id);
// $url = sprintf('http://%s/access/%s',
// sfConfig::get('app_domain_name', $_SERVER['SERVER_NAME']),
// Encryption::encodeUrl('reservation', 'access', array(
// 'user_id' => $reservation->Client->User->id,
// 'uniqid' => $reservation->uniqid
// ))
// );
$url = sprintf('http://%s/access/%s', sfConfig::get('app_domain_name', $_SERVER['SERVER_NAME']), Encryption::getEncryptedUrlFromUri('@reservation_show?uniqid=' . $reservation->uniqid, $reservation->Client->User->id));
$data['reservation'] = $reservation;
$data['url'] = $url;
$data['subject'] = 'Subject';
$filename = $template . '_' . $type;
$message = new esEmailMessage('Test Email');
$message->setFrom(sfConfig::get('app_email_from'));
$message->setTo('some@mail.com');
$message->setAutoEmbedImages(false);
$message->setBodyFromTemplate($this->getController(), 'reservation', $filename, $data, $type == 'html' ? 'email_layout' : 'none');
return $this->renderText($message->getBody());
}
示例2: handleEvent
public static function handleEvent(sfEvent $event)
{
$reservation = $event->getSubject();
switch ($event->getName()) {
case 'reservation.pre_update':
break;
case 'reservation.post_update':
break;
case 'reservation.created':
$url = Encryption::getEncryptedUrlFromUri('@reservation_show?uniqid=' . $reservation->uniqid, $reservation->Client->User->id);
if ($reservation->Client->email_confirmed) {
$subject = 'ATC: Reservation Confirmation #' . $reservation->uniqid;
$template = 'confirm_reservation';
} else {
$subject = 'ATC: please confirm your reservation';
$template = 'request_confirmation';
}
$data = array('email_address' => $reservation->Client->email_address, 'subject' => $subject, 'url' => $url, 'reservation' => $reservation);
self::sendNotification($template, $data);
break;
}
}
示例3: executeTest
public function executeTest(sfWebRequest $request)
{
$this->url = Encryption::getEncryptedUrlFromUri('@encryption_test1?param1=12345');
}
示例4: executeShow
public function executeShow(sfWebRequest $request)
{
$this->forward404Unless($this->reservation = Doctrine_Core::getTable('Reservation')->find(array($request->getParameter('id'))), sprintf('Object reservation does not exist (%s).', $request->getParameter('id')));
$this->transactions = $this->reservation->PaypalTransactions;
$this->reservationUrl = Encryption::getEncryptedUrlFromUri('@reservation_show?uniqid=' . $this->reservation->uniqid, $this->reservation->Client->User->id, false);
}