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


PHP Request::getPath方法代码示例

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


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

示例1: debug

 public function debug()
 {
     $r = new Response();
     var_dump($r->getReasonPhrase());
     $req = new Request();
     $req->getPath();
 }
开发者ID:arthurwayne,项目名称:ovh-sdk-php,代码行数:7,代码来源:VoiceConsumptionException.php

示例2: testRequestHasPath

 /**
  * @covers Guzzle\Http\Message\Request::getPath
  * @covers Guzzle\Http\Message\Request::setPath
  */
 public function testRequestHasPath()
 {
     $this->assertEquals('/', $this->request->getPath());
     $this->assertEquals($this->request, $this->request->setPath('/index.html'));
     $this->assertEquals('/index.html', $this->request->getPath());
     $this->assertEquals($this->request, $this->request->setPath('index.html'));
     $this->assertEquals('/index.html', $this->request->getPath());
 }
开发者ID:idiscussforum,项目名称:providence,代码行数:12,代码来源:RequestTest.php

示例3: signRequest

 /**
  * @param \Guzzle\Http\Message\Request $request
  */
 public function signRequest(Request $request)
 {
     $url = $request->getPath();
     if ('POST' == $request->getMethod() && $request instanceof EntityEnclosingRequest) {
         $body = (string) $request->getBody();
         $hash = $this->signature->generate($body);
     } else {
         $url .= '?' . $request->getQuery();
         $hash = $this->signature->generate($url);
     }
     $request->addCookie('acquia_solr_time', $this->signature->getRequestTime());
     $request->addCookie('acquia_solr_nonce', $this->signature->getNonce());
     $request->addCookie('acquia_solr_hmac', $hash . ';');
     // The timestamp should be current for each request.
     $this->signature->unsetRequestTime();
 }
开发者ID:caxy,项目名称:acquia-sdk-php,代码行数:19,代码来源:AcquiaSearchAuthPlugin.php

示例4: testPermitsFalsyComponents

 /**
  * @covers Guzzle\Http\Message\Request::getHost
  * @covers Guzzle\Http\Message\Request::getPath
  * @covers Guzzle\Http\Message\Request::getQuery
  */
 public function testPermitsFalsyComponents()
 {
     $request = new Request('GET', 'http://0/0?0');
     $this->assertSame('0', $request->getHost());
     $this->assertSame('/0', $request->getPath());
     $this->assertSame('0=', $request->getQuery(true));
     $request = new Request('GET', '0');
     $this->assertEquals('/0', $request->getPath());
 }
开发者ID:biribogos,项目名称:wikihow-src,代码行数:14,代码来源:RequestTest.php

示例5: getRequestPath

 private function getRequestPath(\Guzzle\Http\Message\Request $request)
 {
     // $ret =  str_replace('/app_dev.php', '', $request->getPath());
     $ret = $request->getPath();
     return $ret;
 }
开发者ID:francodacosta,项目名称:caparica-guzzle-plugin,代码行数:6,代码来源:CaparicaGuzzlePlugin.php

示例6: getRequestName

 private function getRequestName(Request $request)
 {
     return (string) $request->getPath();
 }
开发者ID:aztech-dev,项目名称:phraseanet-bundle,代码行数:4,代码来源:TimelinePlugin.php


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