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


PHP DevblocksPlatform::getHttpRequest方法代码示例

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


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

示例1: browseOrgsAction

 function browseOrgsAction()
 {
     $visit = CerberusApplication::getVisit();
     /* @var $visit CerberusVisit */
     $request = DevblocksPlatform::getHttpRequest();
     $stack = $request->path;
     array_shift($stack);
     // contacts
     array_shift($stack);
     // browseOrgs
     @($id = array_shift($stack));
     $org = DAO_ContactOrg::get($id);
     if (empty($org)) {
         echo "<H1>Invalid Organization ID.</H1>";
         return;
     }
     // Display series support (inherited paging from Display)
     @($view_id = array_shift($stack));
     if (!empty($view_id)) {
         $view = C4_AbstractViewLoader::getView($view_id);
         $range = 250;
         $block_size = 250;
         $page = floor($view->renderLimit * $view->renderPage / $block_size);
         list($series, $series_count) = DAO_ContactOrg::search($view->view_columns, $view->params, $block_size, $page, $view->renderSortBy, $view->renderSortAsc, false);
         $series_info = array('title' => $view->name, 'total' => count($series), 'series' => array_flip(array_keys($series)));
         $visit->set('ch_org_series', $series_info);
     }
     DevblocksPlatform::redirect(new DevblocksHttpResponse(array('contacts', 'orgs', 'display', $org->id)));
     exit;
 }
开发者ID:Hildy,项目名称:cerb5,代码行数:30,代码来源:contacts.php

示例2: redirectReadAction

 /**
  * Open an event, mark it read, and redirect to its URL.
  * Used by Home->Notifications view.
  *
  */
 function redirectReadAction()
 {
     $worker = PortSensorApplication::getActiveWorker();
     $request = DevblocksPlatform::getHttpRequest();
     $stack = $request->path;
     array_shift($stack);
     // home
     array_shift($stack);
     // redirectReadAction
     @($id = array_shift($stack));
     // id
     if (null != ($event = DAO_WorkerEvent::get($id))) {
         // Mark as read before we redirect
         DAO_WorkerEvent::update($id, array(DAO_WorkerEvent::IS_READ => 1));
         DAO_WorkerEvent::clearCountCache($worker->id);
         session_write_close();
         header("Location: " . $event->url);
     }
     exit;
 }
开发者ID:jstanden,项目名称:portsensor,代码行数:25,代码来源:home.php

示例3: renderLoginForm

 function renderLoginForm()
 {
     $tpl = DevblocksPlatform::getTemplateService();
     $tpl->cache_lifetime = "0";
     // add translations for calls from classes that aren't Page Extensions (mobile plugin, specifically)
     $translate = DevblocksPlatform::getTranslationService();
     $tpl->assign('translate', $translate);
     // set up redirect (to return to original page if redirected to login page)
     $request = DevblocksPlatform::getHttpRequest();
     $prefix = '';
     $query_str = '';
     foreach ($request->query as $key => $val) {
         $query_str .= $prefix . $key . '=' . $val;
         $prefix = '&';
     }
     $original_path = sizeof($request->path) == 0 ? 'login' : implode(',', $request->path);
     $tpl->assign('original_path', $original_path);
     $tpl->assign('original_query', $query_str);
     // TODO: pull this from a config area
     $server = 'localhost';
     $port = '10389';
     $default_dn = 'cn=William Bush,ou=people,o=sevenSeas';
     $tpl->assign('server', $server);
     $tpl->assign('port', $port);
     $tpl->assign('default_dn', $default_dn);
     // display login form
     $tpl->display('file:' . dirname(dirname(__FILE__)) . '/templates/login/login_form_ldap.tpl');
 }
开发者ID:joegeck,项目名称:cerb4,代码行数:28,代码来源:login.classes.php

示例4: browseAction

 function browseAction()
 {
     $translate = DevblocksPlatform::getTranslationService();
     $visit = CerberusApplication::getVisit();
     /* @var $visit CerberusVisit */
     $request = DevblocksPlatform::getHttpRequest();
     $stack = $request->path;
     array_shift($stack);
     // display
     array_shift($stack);
     // browse
     @($id = array_shift($stack));
     // [JAS]: Mask
     if (!is_numeric($id)) {
         $id = DAO_Ticket::getTicketIdByMask($id);
     }
     $ticket = DAO_Ticket::getTicket($id);
     if (empty($ticket)) {
         echo "<H1>" . $translate->_('display.invalid_ticket') . "</H1>";
         return;
     }
     // Display series support (inherited paging from Display)
     @($view_id = array_shift($stack));
     if (!empty($view_id)) {
         $view = C4_AbstractViewLoader::getView('', $view_id);
         // Restrict to the active worker's groups
         $active_worker = CerberusApplication::getActiveWorker();
         $memberships = $active_worker->getMemberships();
         $view->params['tmp'] = new DevblocksSearchCriteria(SearchFields_Ticket::TICKET_TEAM_ID, 'in', array_keys($memberships));
         $range = 250;
         // how far to jump ahead of the current page
         $block_size = 250;
         $page = floor($view->renderPage * $view->renderLimit / $block_size);
         $index = array();
         $found = false;
         $full = false;
         do {
             list($series, $null) = DAO_Ticket::search(array(SearchFields_Ticket::TICKET_MASK), $view->params, $block_size, $page, $view->renderSortBy, $view->renderSortAsc, false);
             // Index by mask
             foreach ($series as $idx => $val) {
                 // Find our match before we index anything
                 if (!$found && $idx == $id) {
                     $found = true;
                 } elseif (!$found) {
                     // Only keep a max of X things behind our match, reserve the most room ahead
                     if (count($index) == 20) {
                         array_shift($index);
                     }
                 }
                 $index[] = $val[SearchFields_Ticket::TICKET_MASK];
                 // Stop if we fill up our desired rows
                 if (count($index) == $range) {
                     $full = true;
                     break;
                 }
             }
             $page++;
         } while (!empty($series) && !$full);
         $series_info = array('title' => $view->name, 'total' => count($index), 'series' => $index);
         $visit->set('ch_display_series', $series_info);
     }
     DevblocksPlatform::redirect(new DevblocksHttpResponse(array('display', $ticket->mask)));
 }
开发者ID:jsjohnst,项目名称:cerb4,代码行数:63,代码来源:display.php

示例5: browseOppsAction

 function browseOppsAction()
 {
     $visit = CerberusApplication::getVisit();
     /* @var $visit CerberusVisit */
     $request = DevblocksPlatform::getHttpRequest();
     $stack = $request->path;
     array_shift($stack);
     // crm
     array_shift($stack);
     // browseOpps
     @($id = array_shift($stack));
     $opp = DAO_CrmOpportunity::get($id);
     if (empty($opp)) {
         echo "<H1>Invalid Opportunity ID.</H1>";
         return;
     }
     // Display series support (inherited paging from Display)
     @($view_id = array_shift($stack));
     if (!empty($view_id)) {
         $view = C4_AbstractViewLoader::getView('', $view_id);
         // Restrict to the active worker's groups
         $active_worker = CerberusApplication::getActiveWorker();
         //			$memberships = $active_worker->getMemberships();
         //			$view->params['tmp'] = new DevblocksSearchCriteria(SearchFields_CrmOpportunity::TEAM_ID, 'in', array_keys($memberships));
         $range = 100;
         $pos = $view->renderLimit * $view->renderPage;
         $page = floor($pos / $range);
         list($series, $series_count) = DAO_CrmOpportunity::search($view->view_columns, $view->params, $range, $page, $view->renderSortBy, $view->renderSortAsc, false);
         $series_info = array('title' => $view->name, 'total' => count($series), 'series' => $series);
         $visit->set('ch_opp_series', $series_info);
     }
     DevblocksPlatform::redirect(new DevblocksHttpResponse(array('crm', 'opps', $opp->id)));
     exit;
 }
开发者ID:joegeck,项目名称:cerb4,代码行数:34,代码来源:App.php

示例6: render

 function render()
 {
     // draws HTML form of controls needed for login information
     $tpl = DevblocksPlatform::getTemplateService();
     $tpl->cache_lifetime = "0";
     // add translations for calls from classes that aren't Page Extensions (mobile plugin, specifically)
     $translate = DevblocksPlatform::getTranslationService();
     $tpl->assign('translate', $translate);
     $request = DevblocksPlatform::getHttpRequest();
     $prefix = '';
     $query_str = '';
     foreach ($request->query as $key => $val) {
         $query_str .= $prefix . $key . '=' . $val;
         $prefix = '&';
     }
     //$url_service = DevblocksPlatform::getUrlService();
     //$original_url = $url_service->writeDevblocksHttpIO($request);
     //$tpl->assign('original_url', $original_url);
     $original_path = sizeof($request->path) == 0 ? 'login' : implode(',', $request->path);
     $tpl->assign('original_path', $original_path);
     $tpl->assign('original_query', $query_str);
     $tpl->display('file:' . dirname(__FILE__) . '/templates/login/login_form_default.tpl');
 }
开发者ID:jsjohnst,项目名称:cerb4,代码行数:23,代码来源:classes.php

示例7: explorerAction

 function explorerAction()
 {
     $request = DevblocksPlatform::getHttpRequest();
     $stack = $request->path;
     array_shift($stack);
     // forums
     array_shift($stack);
     // explorer
     switch (array_shift($stack)) {
         case 'navigation':
             $this->_renderExplorerNavigation($stack);
             break;
         default:
             $visit = CerberusApplication::getVisit();
             @($start = DevblocksPlatform::importGPC($_REQUEST['start'], 'integer', 0));
             // Load results cache
             if (null == ($forums_view = C4_AbstractViewLoader::getView(C4_ForumsThreadView::DEFAULT_ID))) {
                 // Do something
                 $forums_view = new C4_ForumsThreadView();
             }
             $tpl = DevblocksPlatform::getTemplateService();
             $tpl->cache_lifetime = "0";
             $tpl->assign('path', $this->tpl_path);
             $view_start = $forums_view->renderLimit * $forums_view->renderPage;
             $view_page = floor($view_start / 100);
             list($posts, $count) = DAO_ForumsThread::search($forums_view->params, 100, $view_page, $forums_view->renderSortBy, $forums_view->renderSortAsc, true);
             // Advance the internal pointer to the requested start position
             if (!empty($start) && isset($posts[$start])) {
                 while (key($posts) != $start) {
                     next($posts);
                 }
             }
             if (empty($start)) {
                 $start = key($posts);
             }
             $current = current($posts);
             $visit->set('forums_explorer_results', $posts);
             $visit->set('forums_explorer_results_pos', $start);
             //				$visit->set('forums_explorer_results_total', $count);
             $tpl->assign('current_post', $current);
             $tpl->display('file:' . $this->tpl_path . '/explorer/index.tpl');
             break;
     }
     session_write_close();
     exit;
 }
开发者ID:rmiddle,项目名称:cerb4,代码行数:46,代码来源:App.php

示例8: searchviewAction

 function searchviewAction()
 {
     $visit = CerberusApplication::getVisit();
     $response = DevblocksPlatform::getHttpRequest();
     $path = $response->path;
     array_shift($path);
     // tickets
     array_shift($path);
     // searchview
     $id = array_shift($path);
     $view = C4_AbstractViewLoader::getView($id);
     if (!empty($view->params)) {
         $params = array();
         // Index by field name for search system
         if (is_array($view->params)) {
             foreach ($view->params as $key => $criteria) {
                 /* @var $criteria DevblocksSearchCriteria */
                 $params[$key] = $criteria;
             }
         }
     }
     if (null == ($search_view = C4_AbstractViewLoader::getView(CerberusApplication::VIEW_SEARCH))) {
         $search_view = C4_TicketView::createSearchView();
     }
     $search_view->params = $params;
     $search_view->renderPage = 0;
     C4_AbstractViewLoader::setView($search_view->id, $search_view);
     DevblocksPlatform::setHttpResponse(new DevblocksHttpResponse(array('tickets', 'search')));
 }
开发者ID:Hildy,项目名称:cerb5,代码行数:29,代码来源:tickets.php

示例9: render

 public function render()
 {
     // draws HTML form of controls needed for login information
     $tpl = DevblocksPlatform::getTemplateService();
     // add translations for calls from classes that aren't Page Extensions (mobile plugin, specifically)
     $translate = DevblocksPlatform::getTranslationService();
     $tpl->assign('translate', $translate);
     $request = DevblocksPlatform::getHttpRequest();
     $original_path = sizeof($request->path) == 0 ? 'login' : implode(',', $request->path);
     $tpl->assign('original_path', $original_path);
     $tpl->display('file:' . $this->_TPL_PATH . 'login.tpl');
 }
开发者ID:sluther,项目名称:cerb5-iphone,代码行数:12,代码来源:App.php


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