當前位置: 首頁>>代碼示例>>PHP>>正文


PHP type::getResponse方法代碼示例

本文整理匯總了PHP中type::getResponse方法的典型用法代碼示例。如果您正苦於以下問題:PHP type::getResponse方法的具體用法?PHP type::getResponse怎麽用?PHP type::getResponse使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在type的用法示例。


在下文中一共展示了type::getResponse方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: formNotAuthResponse

 /**
  * ответ об ошибке и редирект
  * @param type $e
  * @return type
  */
 private function formNotAuthResponse($e)
 {
     $url = $e->getRouter()->assemble(array(), array('name' => 'users/default'));
     $response = $e->getResponse();
     $response->getHeaders()->addHeaderLine('Location', $url);
     $response->setStatusCode(302);
     $response->sendHeaders();
     return $response;
 }
開發者ID:seyfer,項目名稱:zend2-tutorial.me,代碼行數:14,代碼來源:Module.php

示例2: testAccessIsDeniedForUnauthorized

 /**
  * 
  * @dataProvider getSecuredPagesAuthenticated
  * @param type $client
  * @param type $url
  */
 public function testAccessIsDeniedForUnauthorized($client, $url)
 {
     $client->request('GET', $url);
     $this->assertEquals(403, $client->getResponse()->getStatusCode());
 }
開發者ID:Chill-project,項目名稱:Activity,代碼行數:11,代碼來源:ActivityControllerTest.php

示例3: onRequestSent

 /**
  * Query has received a result, stop the query.
  */
 public function onRequestSent(Event $event)
 {
     $stopTime = microtime(TRUE);
     $this->time = round(($stopTime - $this->startTime) * 1000, 2);
     $this->response = $this->request->getResponse();
 }
開發者ID:cultuurnet,項目名稱:auth,代碼行數:9,代碼來源:Request.php

示例4: getResponse

 /**
  * 
  * @param type $method
  * @param type $uri
  * @return type
  * @throws InvalidStatusCodeException
  */
 protected function getResponse($method, $uri)
 {
     if ($this->responseStatusCode != NULL) {
         $_responseStatusCode = $this->responseStatusCode;
         if ($method->getResponse($this->responseStatusCode) != NULL) {
             $this->responseStatusCode = NULL;
             return $method->getResponse($_responseStatusCode);
         }
         throw new InvalidStatusCodeException($this->responseStatusCode, $uri, $method->getType());
     }
     foreach ($this->statusCodes as $statusCode) {
         $response = $method->getResponse($statusCode);
         if ($response != NULL) {
             return $response;
         }
     }
     if (sizeof($method->getResponses()) > 0) {
         $responses = $method->getResponses();
         return $responses[key($responses)];
     }
     throw new NoResponseFoundException($uri, $method->getType());
 }
開發者ID:karpdamian,項目名稱:mock,代碼行數:29,代碼來源:RamlMockHandler.php


注:本文中的type::getResponse方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。