Zend_Http_Client::getUri PHP Method

getUri() public method

Get the URI for the next request
public getUri ( boolean $as_string = false ) : Zend_Uri_Http | string
$as_string boolean If true, will return the URI as a string
return Zend_Uri_Http | string
    public function getUri($as_string = false)
    {
        if ($as_string && $this->uri instanceof Zend_Uri_Http) {
            return $this->uri->__toString();
        } else {
            return $this->uri;
        }
    }

Usage Example

Example #1
0
 /**
  * Test we can SET and GET a URI as object
  *
  */
 public function testSetGetUriObject()
 {
     $uriobj = Zend_Uri::factory('http://www.zend.com:80/');
     $this->client->setUri($uriobj);
     $uri = $this->client->getUri();
     $this->assertTrue($uri instanceof Zend_Uri_Http, 'Returned value is not a Uri object as expected');
     $this->assertEquals($uri, $uriobj, 'Returned object is not the excepted Uri object');
 }
All Usage Examples Of Zend_Http_Client::getUri