Rename Zend/Http/Header/AbstractLocation methods uri() and getUri()
This issue has been moved from the zendframework repository as part of the bug migration program as outlined here - http://framework.zend.com/blog/2016-04-11-issue-closures.html
Original Issue: https://github.com/zendframework/zendframework/issues/7283 User: @27cm Created On: 2015-03-01T10:25:28Z Updated At: 2015-11-06T20:54:28Z Body I propose to rename AbstractLocation methods according to Http/Request methods: getUri() to getUriString(), uri() to getUri().
Zend/Http/Request:
/**
* Return the URI for this request object
*
* @return HttpUri
*/
public function getUri()
{
if ($this->uri === null || is_string($this->uri)) {
$this->uri = new HttpUri($this->uri);
}
return $this->uri;
}
/**
* Return the URI for this request object as a string
*
* @return string
*/
public function getUriString()
{
if ($this->uri instanceof HttpUri) {
return $this->uri->toString();
}
return $this->uri;
}
Zend/Http/Header/AbstractLocation:
/**
* Return the URI for this header as an instance of Zend\Uri\Http
*
* @return UriInterface
*/
public function uri()
{
if ($this->uri === null || is_string($this->uri)) {
$this->uri = UriFactory::factory($this->uri);
}
return $this->uri;
}
/**
* Return the URI for this header
*
* @return string
*/
public function getUri()
{
if ($this->uri instanceof UriInterface) {
return $this->uri->toString();
}
return $this->uri;
}
Comment
User: @liufang Created On: 2015-03-03T00:40:07Z Updated At: 2015-03-03T00:40:07Z Body Retain only a geturi
$this->getUri(); //return object (string)$this->getUri(); // string
This repository has been closed and moved to laminas/laminas-http; a new issue has been opened at https://github.com/laminas/laminas-http/issues/9.