| | |
| | | |
| | | /* |
| | | +-----------------------------------------------------------------------+ |
| | | | program/include/rc,aiƶ_output_json.php | |
| | | | program/include/rcmail_output_json.php | |
| | | | | |
| | | | This file is part of the Roundcube Webmail client | |
| | | | Copyright (C) 2008-2012, The Roundcube Dev Team | |
| | |
| | | /** |
| | | * View class to produce JSON responses |
| | | * |
| | | * @package Core |
| | | * @package Webmail |
| | | * @subpackage View |
| | | */ |
| | | class rcmail_output_json extends rcmail_output |
| | |
| | | if (!empty($this->callbacks)) |
| | | $response['callbacks'] = $this->callbacks; |
| | | |
| | | // trigger generic hook where plugins can put additional content to the response |
| | | $hook = $this->app->plugins->exec_hook("render_response", array('response' => $response)); |
| | | |
| | | // save some memory |
| | | $response = $hook['response']; |
| | | unset($hook['response']); |
| | | |
| | | echo self::json_serialize($response); |
| | | } |
| | | |