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


PHP Request::getURL方法代码示例

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


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

示例1: outputMoveHref

 function outputMoveHref()
 {
     $request = new Request();
     $request->setView('MoveProducts');
     $request->setAction('MoveToProducts');
     return $request->getURL();
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:7,代码来源:move_products_az.php

示例2: getTag

 /**
  * @ describe the function ->getTag.
  */
 function getTag($tag)
 {
     global $application;
     $value = null;
     switch ($tag) {
         case 'EditLink':
             $request = new Request();
             $request->setAction('SetCurrentProductType');
             $request->setView('EditProductType');
             $request->setKey('type_id', $this->_type['id']);
             $value = $request->getURL();
             break;
         case 'TypeName':
             $value = $this->_type['name'];
             break;
         case 'TypeDescription':
             $value = '';
             if ($this->_type['description'] != '') {
                 $value = ' - ' . $this->_type['description'];
             }
             break;
         case 'ProductTypes':
             $value = $this->outputProductTypes();
             break;
         default:
             break;
     }
     return $value;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:32,代码来源:manage_product_types_az.php

示例3: getTag

 /**
  * Processes tags in the templates for the given view.
  *
  * @return string tag value, if tag has been processed. NULL, otherwise.
  */
 function getTag($tag)
 {
     global $application;
     $value = null;
     switch ($tag) {
         case 'Local_SearchFormAction':
             $_request = new Request();
             $_request->setView('SearchResult');
             $value = $_request->getURL();
             break;
         case 'Local_SearchFormName':
             $value = 'CatalogSearchForm';
             break;
         case 'Local_ActionName':
             $value = 'asc_action';
             break;
         case 'Local_ActionValue':
             $value = 'SearchProducts';
             break;
         case 'Local_SearchTextFieldName':
             $value = 'search_pattern';
             break;
         case 'Local_SearchText':
             if (modApiFunc('Session', 'is_Set', 'search_result_id')) {
                 $search_id = modApiFunc('Session', 'get', 'search_result_id');
                 $value = modApiFunc('CatalogSearch', 'getSearchPatternInSearchResult', $search_id);
                 $value = prepareHTMLDisplay($value);
             } else {
                 $value = '';
             }
             break;
     }
     return $value;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:39,代码来源:search_form_az.php

示例4: getReviewTagValue

 /**
  * Returns Review info tag value
  */
 function getReviewTagValue($tag)
 {
     $output = '';
     // if productid is incorrect returns '' in any case
     if ($this->_productid_invalid) {
         return '';
     }
     switch ($tag) {
         case 'number':
             $output = modApiFunc('Customer_Reviews', 'getProductCustomerReviewNumber', $this->_productid);
             if (!$this->checkReviewAvail(6, 7)) {
                 $output = 0;
             }
             break;
         case 'averagerating':
             $output = modApiFunc('Customer_Reviews', 'getTotalProductRating', $this->_productid);
             $output = $output['total_rating'];
             if (!$this->checkReviewAvail(7)) {
                 $output = 0;
             }
             break;
         case 'link':
             $cid = modApiFunc('CProductListFilter', 'getCurrentCategoryId');
             $r = new Request();
             $r->setView('ProductInfo');
             $r->setAction('SetCurrentProduct');
             $r->setKey('prod_id', $this->_productid);
             $r->setProductID($this->_productid);
             $r->setCategoryID($cid);
             $r->setAnchor('customer_reviews_' . $this->_productid);
             return $r->getURL();
     }
     return $output;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:37,代码来源:product_review_info.php

示例5: output

 /**
  *
  */
 function output()
 {
     global $application;
     $request = new Request();
     $request->setView('AdminBackupDeleteProgress');
     $request->setAction('BackupDeleteAction');
     $ProgressBarFormAction = $request->getURL();
     $ImgQtyTotal = modApiFunc("Tools", "getImgQtyTotal");
     $DeletedImgQty = modApiFunc("Tools", "getDeletedImgQty");
     if ($ImgQtyTotal) {
         if ($ImgQtyTotal == $DeletedImgQty + 3) {
             $ProgressBarWidth = 400;
             modApiFunc("Tools", "unsetDeletedImgQty");
             modApiFunc("Tools", "unsetImgQtyTotal");
         } else {
             $ProgressBarWidth = floor($DeletedImgQty / $ImgQtyTotal * 400);
         }
     } else {
         $ProgressBarWidth = 0;
     }
     if (!is_dir($application->getAppIni('PATH_BACKUP_DIR') . modApiFunc("Tools", "getCurrentBackupFile") . "/")) {
         $ProgressBarWidth = 400;
         modApiFunc("Tools", "unsetDeletedImgQty");
         modApiFunc("Tools", "unsetImgQtyTotal");
     }
     modApiFunc("Tools", "saveState");
     $template_contents = array('ProgressBarFormAction' => $ProgressBarFormAction, 'ProgressBarWidth' => $ProgressBarWidth);
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     return modApiFunc('TmplFiller', 'fill', "tools/backup_delete_progress/", "container.tpl.html", array());
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:34,代码来源:backup_delete_progress_az.php

示例6: route

 /**
  * @param	Huxtable\Web\Request	$request
  * @return	Huxtable\Web\Response
  */
 public function route(Request $request)
 {
     $url = $request->getURL();
     $method = $request->getMethod();
     // Default response
     $response = new Response();
     $response->setStatusCode(404);
     $response->setContents('Not Found :(');
     if (isset($this->routes[$url])) {
         $routes = $this->routes[$url];
         // Route pattern + method match found
         if (isset($this->routes[$url][$method])) {
             $routeObject = $this->routes[$url][$method];
             $routeObject->setRequest($request);
             // Call authenticatiion callback if defined
             $authenticationClosure = $routeObject->getAuthenticationClosure();
             if ($authenticationClosure != false) {
                 try {
                     call_user_func($authenticationClosure);
                 } catch (Request\UnauthorizedException $e) {
                     $routeObject->response->setStatusCode(401);
                     $routeObject->response->setContents($routeObject->response->getStatusMessage());
                     return $routeObject->response;
                 }
             }
             // Confirm required headers were sent
             foreach ($routeObject->getRequiredHeaders() as $header) {
                 if ($request->getHeader($header) === false) {
                     $response->setStatusCode(400);
                     $response->setContents($routeObject->response->getContents());
                     return $response;
                 }
             }
             // Confirm required arguments were passed
             foreach ($routeObject->getRequiredArguments() as $argument) {
                 if ($request->getArgument($argument) === false) {
                     $response = new Response();
                     $response->setStatusCode(400);
                     $response->setContents("Missing required argument '{$argument}'");
                     return $response;
                 }
             }
             try {
                 // Call the main routing closure
                 $contents = call_user_func($routeObject->getClosure());
             } catch (\Exception $e) {
                 $response = new Response();
                 $response->setStatusCode(500);
                 $response->setContents($e->getMessage());
                 return $response;
             }
             $routeObject->response->setContents($contents);
             return $routeObject->response;
         }
         // No route pattern + method match found
         $response->setStatusCode(405);
         $response->setContents('Method Not Allowed :(');
     }
     return $response;
 }
开发者ID:huxtable,项目名称:web,代码行数:64,代码来源:Application.php

示例7: MailInfo

 /**
  * MailInfo constructor
  */
 function MailInfo()
 {
     global $application;
     $MR =& $application->getInstance('MessageResources');
     //initialize form data with null values when adding a new notification
     $this->currentNotificationId = modApiFunc("Notifications", "getCurrentNotificationId");
     if ($this->currentNotificationId == 'Add') {
         $this->notificationInfo = array('Id' => '', 'Name' => '', 'Subject' => '', 'Body' => '', 'JavascriptBody' => '', 'From_addr' => '', 'Email_Code' => '', 'Active' => 'checked', 'Action_id' => 1);
         $request = new Request();
         $request->setView('NotificationInfo');
         $request->setAction('AddNotification');
         $formAction = $request->getURL();
         $this->properties = array('SubmitButton' => $MR->getMessage('BTN_ADD'), 'FormAction' => $formAction);
     } else {
         //initialize form data with database values when editing the notification
         $this->notificationInfo = modApiFunc("Notifications", "getNotificationInfo", $this->currentNotificationId);
         if (sizeof($this->notificationInfo) == 1) {
             $this->notificationInfo = $this->notificationInfo[0];
             $this->notificationInfo['JavascriptBody'] = addcslashes(addslashes($this->notificationInfo['Body']), "..");
             $this->notificationInfo['Body'] = prepareHTMLDisplay($this->notificationInfo['Body']);
         } else {
             $this->currentNotificationId = 'Add';
             $this->notificationInfo = array('Id' => '', 'Name' => '', 'Subject' => '', 'Body' => '', 'JavascriptBody' => '', 'From_addr' => '', 'Email_Code' => '', 'Active' => 'checked', 'Action_id' => 1);
         }
         $request = new Request();
         $request->setView('NotificationInfo');
         $request->setAction('SaveNotification');
         $formAction = $request->getURL();
         $this->properties = array('SubmitButton' => $MR->getMessage('BTN_SAVE'), 'FormAction' => $formAction);
     }
     $this->actionsList = modApiFunc("Notifications", "getActionsList");
     $this->InfoTags = modApiFunc("Notifications", "getAvailableTagsList", $this->actionsList);
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:36,代码来源:mail_info_az.php

示例8: output

 function output()
 {
     global $application;
     loadCoreFile('html_form.php');
     $this->_messageResources =& Subscriptions::getMessageResources();
     $this->_tmplFiller = new TmplFiller(dirname(dirname(__FILE__)) . '/templates_az/');
     $this->_topic_id = modApiFunc('Request', 'getValueByKey', 'topic');
     if (!empty($this->_topic_id)) {
         $this->_mode = SM_EDIT_TOPIC;
     } else {
         $this->_mode = SM_NEW_TOPIC;
     }
     $this->initFormData();
     if (@$this->ViewState['hasCloseScript'] == 'true') {
         modApiFunc("application", "closeChild_UpdateParent");
         return;
     }
     $this->_templateContents = array('ErrorsBox', 'AscAction');
     $application->registerAttributes($this->_templateContents);
     if ($this->_mode == SM_EDIT_TOPIC && empty($this->_topic)) {
         return $this->_tmplFiller->fill('', 'errors/no_topic_edit.tpl.html', array('Message' => $this->_messageResources->getMessage(new ActionMessage(array('TOPIC_DOESNT_EXISTS', $this->_topic_id)))));
     }
     $request = new Request();
     $request->setView(CURRENT_REQUEST_URL);
     $vars = array('FormAction' => $request->getURL(), 'AscAction' => $this->_mode == SM_NEW_TOPIC ? 'create_topic' : 'update_topic', 'TopicId' => $this->_topic_id, 'WinTitle' => $this->_messageResources->getMessage($this->_mode == SM_NEW_TOPIC ? 'TITLE_ADD_TOPIC' : 'TITLE_EDIT_TOPIC'), 'TopicName' => @$this->POST['topic_name'], 'TopicStatusSelect' => $this->getTopicStatusSelect('topic_status', @$this->POST['topic_status']), 'TopicAccessSelect' => $this->getTopicAccessSelect('topic_access', @$this->POST['topic_access']), 'TopicAutosubscribeSelect' => $this->getTopicAutoSubscribeSelect('topic_auto', @$this->POST['topic_auto']));
     $result = $this->_tmplFiller->fill('', 'edit_topic.tpl.html', $vars);
     return $result;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:28,代码来源:edit_topic_az.php

示例9: output

 function output($group_id_range_from = 0, $group_id_range_to = 999999, $group_title)
 {
     $groups = modApiFunc('Reports', 'getReportGroups');
     $current_group_id = (int) modApiFunc('Request', 'getValueByKey', 'report_group_id');
     if ($current_group_id !== null and isset($groups[$current_group_id])) {
         $current_group_id = (int) $current_group_id;
     } else {
         reset($groups);
         $current_group_id = array_keys($groups);
         $current_group_id = $current_group_id[0];
     }
     $links = '';
     foreach ($groups as $grp_id => $grp) {
         if ($grp_id < $group_id_range_from or $grp_id > $group_id_range_to) {
             continue;
         }
         $data = array();
         $data['LinkName'] = $grp['GROUP_NAME'];
         $data['LinkDescription'] = $grp['GROUP_DESCRIPTION'];
         $request = new Request();
         $request->setView(CURRENT_REQUEST_URL);
         $request->setKey('report_group_id', $grp_id);
         $data['LinkHref'] = $request->getURL();
         if ($current_group_id === $grp_id and $current_group_id >= $group_id_range_from and $current_group_id <= $group_id_range_to) {
             $links .= $this->_TmplFiller->fill("", "group-link-selected.tpl.html", $data);
         } else {
             $links .= $this->_TmplFiller->fill("", "group-link.tpl.html", $data);
         }
     }
     return $this->_TmplFiller->fill("", "container.tpl.html", array('ReportGroupLinks' => $links, 'Title' => getMsg('RPTS', $group_title)));
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:31,代码来源:report_groups.php

示例10: output

 /**
  * Returns the Select box view with possible variants of rows
  * per page.
  *
  * @return Select box with possible page values outputted on the page.
  * @ finish the functions on this page
  */
 function output($pag_name, $viewname, $items_name = 'PGNTR_REC_ITEMS', $add_keys = null)
 {
     global $application;
     $obj =& $application->getInstance('MessageResources');
     $retval = '';
     $rows_per_page = modAPIFunc('Paginator', 'getPaginatorRowsPerPage', $pag_name);
     if (!$rows_per_page) {
         $rows_per_page = ROWS_PER_PAGE;
     }
     $currentrows = $rows_per_page;
     $rows_per_page = modApiFunc('Paginator', 'getRowsPerPage');
     $Row_Options = '';
     for ($i = 0; $i < sizeof($rows_per_page); $i++) {
         if ($rows_per_page[$i] == $currentrows) {
             $Row_Options .= '<option selected="selected" value="' . $rows_per_page[$i] . '">' . $rows_per_page[$i] . '</option>';
         } else {
             $Row_Options .= '<option value="' . $rows_per_page[$i] . '">' . $rows_per_page[$i] . '</option>';
         }
     }
     $request = new Request();
     $request->setView(CURRENT_REQUEST_URL);
     $url = $request->getURL();
     $this->paginator_rows = array('ViewName' => $url, 'AdditionalKeyList' => $this->getAdditionalKeyList($add_keys), 'Items_Name' => $obj->getMessage($items_name), 'Row_Options' => $Row_Options, 'pgname' => $pag_name);
     $application->registerAttributes($this->paginator_rows);
     if (modAPIFunc('Paginator', 'getCurrentPaginatorTotalRows') > MIN_ROWS_PER_PAGE) {
         $retval = modApiFunc('TmplFiller', 'fill', "paginator/", "container_rows.tpl.html", array());
     }
     return $retval;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:36,代码来源:paginator_rows_per_page_az.php

示例11: formAction

 function formAction()
 {
     global $application;
     $request = new Request();
     $request->setView('AddTaxClass');
     $request->setAction('AddProdTaxClass');
     return $request->getURL();
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:8,代码来源:tax-settings-add-class-az.php

示例12: formAction

 function formAction()
 {
     global $application;
     $request = new Request();
     $request->setView('EditTaxRate');
     $request->setAction($this->ViewState["TaxRateAction"]);
     return $request->getURL();
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:8,代码来源:tax-settings-edit-rate-az.php

示例13: output

 /**
  *
  */
 function output()
 {
     global $application;
     $request = new Request();
     $request->setView('AdminBackupDeleteProgress');
     $Delete_Start_Link = $request->getURL();
     $template_contents = array('DeleteStartLink' => $Delete_Start_Link, 'BackupName' => modApiFunc("Tools", "getCurrentBackupFile"));
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     return modApiFunc('TmplFiller', 'fill', "tools/backup_delete/", "container.tpl.html", array());
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:14,代码来源:backup_delete_az.php

示例14: outputViewAllLink

 function outputViewAllLink()
 {
     $value = '';
     if ($this->was_randomized) {
         $request = new Request();
         $request->setView(CURRENT_REQUEST_URL);
         $request->setKey('bs_no_rand', 1);
         $url = $request->getURL();
         $msg = cz_getMsg('VIEW_ALL_LABEL');
         $value = str_replace('{URL}', $url, $msg);
     }
     return $value;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:13,代码来源:bestsellers_cz.php

示例15: getTag

 function getTag($tag)
 {
     $value = null;
     switch ($tag) {
         case 'Local_FormActionURL':
             $r = new Request();
             $r->setView('CustomerChangePassword');
             $r->setAction('change_account_password');
             $value = $r->getURL();
             break;
     }
     return $value;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:13,代码来源:customer_change_password_form_cz.php


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