当前位置: 首页>>代码示例>>PHP>>正文


PHP Encryption::getEncryptedUrlFromUri方法代码示例

本文整理汇总了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());
 }
开发者ID:jmiridis,项目名称:atcsf1,代码行数:27,代码来源:actions.class.php

示例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;
     }
 }
开发者ID:jmiridis,项目名称:atcsf1,代码行数:22,代码来源:ReservationEventManager.class.php

示例3: executeTest

 public function executeTest(sfWebRequest $request)
 {
     $this->url = Encryption::getEncryptedUrlFromUri('@encryption_test1?param1=12345');
 }
开发者ID:jmiridis,项目名称:atcsf1,代码行数:4,代码来源:BaseesUriEncryptionAccessActions.class.php

示例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);
 }
开发者ID:jmiridis,项目名称:atcsf1,代码行数:6,代码来源:actions.class.php


注:本文中的Encryption::getEncryptedUrlFromUri方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。