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


PHP XenForo_Application::getRequestPaths方法代码示例

本文整理汇总了PHP中XenForo_Application::getRequestPaths方法的典型用法代码示例。如果您正苦于以下问题:PHP XenForo_Application::getRequestPaths方法的具体用法?PHP XenForo_Application::getRequestPaths怎么用?PHP XenForo_Application::getRequestPaths使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XenForo_Application的用法示例。


在下文中一共展示了XenForo_Application::getRequestPaths方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setRequestPaths

 /**
  * Sets the request paths for this request.
  */
 public function setRequestPaths()
 {
     $requestPaths = XenForo_Application::getRequestPaths($this->_request);
     XenForo_Application::set('requestPaths', $requestPaths);
 }
开发者ID:Troposphir,项目名称:troposphir,代码行数:8,代码来源:XenForo_FrontC.php

示例2: setRequestPaths

 /**
  * Sets the request paths for this request.
  */
 public function setRequestPaths()
 {
     if (!XenForo_Application::isRegistered('requestPaths')) {
         $requestPaths = XenForo_Application::getRequestPaths($this->_request);
         XenForo_Application::set('requestPaths', $requestPaths);
     }
 }
开发者ID:VoDongMy,项目名称:xenforo-laravel5.1,代码行数:10,代码来源:FrontController.php

示例3: actionPurchase

 public function actionPurchase()
 {
     $visitor = XenForo_Visitor::getInstance();
     $xenOptions = XenForo_Application::get('options');
     $paidContentId = $this->_input->filterSingle('paid_content_id', XenForo_Input::UINT);
     $paidContentModel = $this->_getPaidContentModel();
     $paidContentItem = $paidContentModel->preparePaidContent($this->_getPaidContentItemOrError($paidContentId));
     $paidContentHandler = $paidContentModel->getPaidContentHandler($paidContentItem['content_type']);
     if (!$paidContentHandler) {
         return $this->responseNoPermission();
     }
     $content = $paidContentHandler->getContentById($paidContentItem['content_id']);
     if (!$content) {
         return $this->responseNoPermission();
     }
     if (!$visitor['user_id'] && ($paidContentItem['user_group_ids'] == -1 || in_array(XenForo_Model_User::$defaultRegisteredGroupId, explode(',', $paidContentItem['user_group_ids'])))) {
         return $this->responseReroute('XenForo_ControllerPublic_Register', 'index');
     }
     if (!$paidContentModel->canPurchasePaidContentItem($paidContentItem)) {
         return $this->responseNoPermission();
     }
     if ($this->_checkCsrfFromToken(null, false)) {
         $paths = XenForo_Application::getRequestPaths(new Zend_Controller_Request_Http());
         $baseUrl = $paths['fullBasePath'];
         $params = array('cmd' => '_xclick', 'amount' => $paidContentItem['cost_amount'], 'business' => $paidContentItem['paypal_email'] ? $paidContentItem['paypal_email'] : $xenOptions->payPalPrimaryAccount, 'currency_code' => $paidContentItem['currency'], 'item_name' => $paidContentHandler->getTitleForContent($content), 'quantity' => 1, 'no_note' => 1, 'custom' => implode(',', array($visitor->user_id, $paidContentItem['paid_content_id'], 'token', $visitor->csrf_token_page)), 'charset' => 'utf-8', 'email' => $visitor->email, 'return' => XenForo_Link::buildPublicLink('full:paid-content/purchase-success'), 'cancel_return' => XenForo_Link::buildPublicLink('full:index'), 'notify_url' => $baseUrl . 'paid_content_callback.php');
         $payPalUrl = $this->_input->filterSingle('payPalUrl', XenForo_Input::STRING);
         if (!$payPalUrl) {
             $payPalUrl = 'https://www.paypal.com/cgi-bin/websrc';
         }
         // Redirect to paypal
         $url = $payPalUrl . '?' . XenForo_Link::buildQueryString($params);
         header('Location: ' . $url);
         exit;
     }
     $viewParams = array('title' => $paidContentHandler->getTitleForContent($content), 'breadCrumbs' => $paidContentHandler->getBreadcrumbsForContent($content), 'paidContentItem' => $paidContentItem);
     return $this->responseView('ThemeHouse_PayForContent_ViewPublic_PaidContent_PurchaseConfirm', 'th_purchase_confirm_payforcontent', $viewParams);
 }
开发者ID:ThemeHouse-XF,项目名称:PayForContent,代码行数:37,代码来源:PaidContent.php


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