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


PHP SS_HTTPRequest::params方法代码示例

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


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

示例1: assignteams

 public function assignteams(SS_HTTPRequest $request)
 {
     $params = $request->params();
     $game_id = $params['ID'];
     $teams = Team::get();
     $data = new ArrayData(array('Form' => $this->assignTeamsForm($game_id), 'ParentLink' => $this->Link()));
     return $data->renderWith(array('AssignTeams', 'Page'));
 }
开发者ID:jackmarchant,项目名称:foosfirst,代码行数:8,代码来源:GamesPage.php

示例2: view

 public function view(SS_HTTPRequest $request)
 {
     $params = $request->params();
     $player_id = $params['ID'];
     $player = Player::get()->filter('ID', $player_id)->first();
     $link = $this->Link();
     $data = new ArrayData(array('Player' => $player, 'ParentLink' => $link));
     return $data->renderWith(array('Player', 'Page'));
 }
开发者ID:jackmarchant,项目名称:foosfirst,代码行数:9,代码来源:PlayersPage.php

示例3: transferlog

 /**
  * Action - Get the latest deploy log
  *
  * @param SS_HTTPRequest $request
  *
  * @return string
  * @throws SS_HTTPResponse_Exception
  */
 public function transferlog(SS_HTTPRequest $request)
 {
     $this->setCurrentActionType(self::ACTION_SNAPSHOT);
     $params = $request->params();
     $transfer = DNDataTransfer::get()->byId($params['Identifier']);
     if (!$transfer || !$transfer->ID) {
         throw new SS_HTTPResponse_Exception('Transfer not found', 404);
     }
     if (!$transfer->canView()) {
         return Security::permissionFailure();
     }
     $environment = $transfer->Environment();
     $project = $environment->Project();
     if ($project->Name != $params['Project']) {
         throw new LogicException("Project in URL doesn't match this deploy");
     }
     $log = $transfer->log();
     if ($log->exists()) {
         $content = $log->content();
     } else {
         $content = 'Waiting for action to start';
     }
     return $this->sendResponse($transfer->ResqueStatus(), $content);
 }
开发者ID:udomsak,项目名称:deploynaut,代码行数:32,代码来源:DNRoot.php

示例4: transferlog

 /**
  * Action - Get the latest deploy log
  *
  * @return string
  */
 public function transferlog(SS_HTTPRequest $request)
 {
     $params = $request->params();
     $transfer = DNDataTransfer::get()->byId($params['Identifier']);
     if (!$transfer || !$transfer->ID) {
         throw new SS_HTTPResponse_Exception('Transfer not found', 404);
     }
     if (!$transfer->canView()) {
         return Security::permissionFailure();
     }
     $environment = $transfer->Environment();
     $project = $environment->Project();
     if ($project->Name != $params['Project']) {
         throw new LogicException("Project in URL doesn't match this deploy");
     }
     $log = $transfer->log();
     if ($log->exists()) {
         $content = $log->content();
     } else {
         $content = 'Waiting for action to start';
     }
     $sendJSON = strpos($request->getHeader('Accept'), 'application/json') !== false || $request->getExtension() == 'json';
     $content = preg_replace('/(?:(?:\\r\\n|\\r|\\n)\\s*){2}/s', "\n", $content);
     if ($sendJSON) {
         $this->response->addHeader("Content-type", "application/json");
         return json_encode(array('status' => $transfer->ResqueStatus(), 'content' => $content));
     } else {
         $this->response->addHeader("Content-type", "text/plain");
         return $content;
     }
 }
开发者ID:adrexia,项目名称:deploynaut,代码行数:36,代码来源:DNRoot.php


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