mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Adding documentation for a new feature.
This commit is contained in:
parent
4a0e34a0d6
commit
f8dbeb2b70
1 changed files with 13 additions and 2 deletions
|
@ -488,6 +488,16 @@ class RequestHandlerComponent extends Component {
|
||||||
/**
|
/**
|
||||||
* Sets the layout and template paths for the content type defined by $type.
|
* Sets the layout and template paths for the content type defined by $type.
|
||||||
*
|
*
|
||||||
|
* ### Usage:
|
||||||
|
*
|
||||||
|
* Render the response as an 'ajax' response.
|
||||||
|
*
|
||||||
|
* `$this->RequestHandler->renderAs($this, 'ajax');`
|
||||||
|
*
|
||||||
|
* Render the response as an xml file and force the result as a file download.
|
||||||
|
*
|
||||||
|
* `$this->RequestHandler->renderAs($this, 'xml', array('attachment' => 'myfile.xml');`
|
||||||
|
*
|
||||||
* @param object $controller A reference to a controller object
|
* @param object $controller A reference to a controller object
|
||||||
* @param string $type Type of response to send (e.g: 'ajax')
|
* @param string $type Type of response to send (e.g: 'ajax')
|
||||||
* @param array $options Array of options to use
|
* @param array $options Array of options to use
|
||||||
|
@ -536,8 +546,8 @@ class RequestHandlerComponent extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the response header based on type map index name. If DEBUG is greater than 2, the header
|
* Sets the response header based on type map index name. This wraps several methods
|
||||||
* is not set.
|
* available on CakeResponse. It also allows you to use Content-Type aliases.
|
||||||
*
|
*
|
||||||
* @param mixed $type Friendly type name, i.e. 'html' or 'xml', or a full content-type,
|
* @param mixed $type Friendly type name, i.e. 'html' or 'xml', or a full content-type,
|
||||||
* like 'application/x-shockwave'.
|
* like 'application/x-shockwave'.
|
||||||
|
@ -601,6 +611,7 @@ class RequestHandlerComponent extends Component {
|
||||||
*
|
*
|
||||||
* @param mixed $cType Either a string content type to map, or an array of types.
|
* @param mixed $cType Either a string content type to map, or an array of types.
|
||||||
* @return mixed Aliases for the types provided.
|
* @return mixed Aliases for the types provided.
|
||||||
|
* @deprecated Use $this->response->mapType() in your controller instead.
|
||||||
*/
|
*/
|
||||||
public function mapType($cType) {
|
public function mapType($cType) {
|
||||||
return $this->response->mapType($cType);
|
return $this->response->mapType($cType);
|
||||||
|
|
Loading…
Add table
Reference in a new issue