* @since 2.0 */ class RequestPanel extends Panel { public function getName() { return 'Request'; } public function getSummary() { $memory = sprintf('%.2fMB', $this->data['memory'] / 1048576); $time = sprintf('%.3fs', $this->data['time']); return << Peak memory: $memory
Time spent: $time
EOD; } public function getDetail() { return '

Request

'; } public function save() { return array( 'memory' => memory_get_peak_usage(), 'time' => microtime(true) - YII_BEGIN_TIME, 'SERVER' => $_SERVER, 'GET' => $_GET, 'POST' => $_POST, 'COOKIE' => $_COOKIE, 'FILES' => empty($_FILES) ? array() : $_FILES, 'SESSION' => empty($_SESSION) ? array() : $_SESSION, ); } }