|
@@ -285,20 +285,18 @@ abstract class Request
|
|
|
*
|
|
|
* @param mixed $name
|
|
|
* @param mixed $value
|
|
|
- * @return boolean | Qii_Request_Abstract
|
|
|
+ * @return $this
|
|
|
*/
|
|
|
public function setParam($name, $value = null)
|
|
|
{
|
|
|
if (is_null($value)) {
|
|
|
if (is_array($name)) {
|
|
|
$this->params = array_merge($this->params, $name);
|
|
|
- return $this;
|
|
|
}
|
|
|
} elseif (is_string($name)) {
|
|
|
$this->params[$name] = $value;
|
|
|
- return $this;
|
|
|
}
|
|
|
- return false;
|
|
|
+ return $this;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -319,16 +317,15 @@ abstract class Request
|
|
|
/**
|
|
|
* setParams
|
|
|
*
|
|
|
- * @param array
|
|
|
- * @return boolean | Qii_Request_Abstract
|
|
|
+ * @param array $params
|
|
|
+ * @return $this
|
|
|
*/
|
|
|
public function setParams($params)
|
|
|
{
|
|
|
if (is_array($params)) {
|
|
|
$this->params = $params;
|
|
|
- return $this;
|
|
|
}
|
|
|
- return false;
|
|
|
+ return $this;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -346,7 +343,7 @@ abstract class Request
|
|
|
* setException
|
|
|
*
|
|
|
* @param Exception $exception
|
|
|
- * @return boolean | Qii_Request_Abstract
|
|
|
+ * @return $this
|
|
|
*/
|
|
|
public function setException($exception)
|
|
|
{
|
|
@@ -354,9 +351,8 @@ abstract class Request
|
|
|
&& ($exception instanceof Exception)
|
|
|
) {
|
|
|
$this->_exception = $exception;
|
|
|
- return $this;
|
|
|
}
|
|
|
- return false;
|
|
|
+ return $this;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -413,13 +409,13 @@ abstract class Request
|
|
|
* setModuleName
|
|
|
*
|
|
|
* @param string $name
|
|
|
- * @return boolean | Qii_Request_Abstract
|
|
|
+ * @return $this
|
|
|
*/
|
|
|
public function setModuleName($name)
|
|
|
{
|
|
|
if (!is_string($name)) {
|
|
|
trigger_error('Expect a string module name', E_USER_WARNING);
|
|
|
- return false;
|
|
|
+ return $this;
|
|
|
}
|
|
|
$this->module = $name;
|
|
|
return $this;
|
|
@@ -429,7 +425,7 @@ abstract class Request
|
|
|
* setControllerName
|
|
|
*
|
|
|
* @param string $name
|
|
|
- * @return boolean | Qii_Request_Abstract
|
|
|
+ * @return $this
|
|
|
*/
|
|
|
public function setControllerName($name)
|
|
|
{
|
|
@@ -445,13 +441,13 @@ abstract class Request
|
|
|
* setActionName
|
|
|
*
|
|
|
* @param string $name
|
|
|
- * @return boolean | Qii_Request_Abstract
|
|
|
+ * @return $this
|
|
|
*/
|
|
|
public function setActionName($name)
|
|
|
{
|
|
|
if (!is_string($name)) {
|
|
|
trigger_error('Expect a string action name', E_USER_WARNING);
|
|
|
- return false;
|
|
|
+ return $this;
|
|
|
}
|
|
|
$this->action = $name;
|
|
|
return $this;
|
|
@@ -483,15 +479,14 @@ abstract class Request
|
|
|
* setBaseUri
|
|
|
*
|
|
|
* @param string $baseUri
|
|
|
- * @return boolean | Qii\Request\Abstract
|
|
|
+ * @return $this
|
|
|
*/
|
|
|
public function setBaseUri($baseUri)
|
|
|
{
|
|
|
if ($baseUri && is_string($baseUri)) {
|
|
|
$this->_baseUri = $baseUri;
|
|
|
- return $this;
|
|
|
}
|
|
|
- return false;
|
|
|
+ return $this;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -509,15 +504,14 @@ abstract class Request
|
|
|
* setRequestUri
|
|
|
*
|
|
|
* @param string $uri
|
|
|
- * @return boolean | Qii_Request_Abstract
|
|
|
+ * @return $this
|
|
|
*/
|
|
|
public function setRequestUri($uri)
|
|
|
{
|
|
|
if (is_string($uri)) {
|
|
|
$this->uri = $uri;
|
|
|
- return $this;
|
|
|
}
|
|
|
- return false;
|
|
|
+ return $this;
|
|
|
}
|
|
|
|
|
|
/**
|