mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Refactored Controller::header() to use the CakeResponse object, deprecated Controller::header() and Controller::httpCodes()
This commit is contained in:
parent
9d104fee73
commit
60f504a470
1 changed files with 4 additions and 3 deletions
|
@ -557,6 +557,7 @@ class Controller extends Object {
|
|||
*
|
||||
* @return mixed Associative array of the HTTP codes as keys, and the message
|
||||
* strings as values, or null of the given $code does not exist.
|
||||
* @deprecated
|
||||
*/
|
||||
public function httpCodes($code = null) {
|
||||
return $this->response->httpCodes($code);
|
||||
|
@ -670,14 +671,14 @@ class Controller extends Object {
|
|||
}
|
||||
|
||||
/**
|
||||
* Convenience and object wrapper method for header(). Useful when doing tests and
|
||||
* asserting that particular headers have been set.
|
||||
* Convenience and object wrapper method for CakeResponse::header().
|
||||
*
|
||||
* @param string $status The header message that is being set.
|
||||
* @return void
|
||||
* @deprecated
|
||||
*/
|
||||
public function header($status) {
|
||||
header($status);
|
||||
$this->response->header($status);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue