Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
12345 anikendra 1
<?php
2
/**
3
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
4
 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
5
 *
6
 * Licensed under The MIT License
7
 * Redistributions of files must retain the above copyright notice.
8
 *
9
 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
10
 * @link          http://cakephp.org CakePHP(tm) Project
11
 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
12
 */
13
 
14
App::uses('DebugPanel', 'DebugKit.Lib');
15
 
16
/**
17
 * Provides debug information on the Current request params.
18
 *
19
 */
20
class RequestPanel extends DebugPanel {
21
 
22
/**
23
 * beforeRender callback - grabs request params
24
 *
25
 * @param Controller $controller
26
 * @return array
27
 */
28
	public function beforeRender(Controller $controller) {
29
		$out = array();
30
		$out['params'] = $controller->request->params;
31
		$out['url'] = $controller->request->url;
32
		$out['query'] = $controller->request->query;
33
		$out['data'] = $controller->request->data;
34
		if (isset($controller->Cookie)) {
35
			$out['cookie'] = $controller->Cookie->read();
36
		}
37
		$out['get'] = $_GET;
38
		$out['currentRoute'] = Router::currentRoute();
39
		return $out;
40
	}
41
}