| | |
| | | <?php |
| | | |
| | | /* |
| | | /** |
| | | +-----------------------------------------------------------------------+ |
| | | | program/include/rcmail_output_json.php | |
| | | | | |
| | |
| | | | Author: Aleksander Machniak <alec@alec.pl> | |
| | | +-----------------------------------------------------------------------+ |
| | | */ |
| | | |
| | | |
| | | /** |
| | | * View class to produce JSON responses |
| | |
| | | $this->command('set_pagetitle', empty($name) ? $title : $name.' :: '.$title); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Register a template object handler |
| | | * |
| | |
| | | // ignore |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Register a list of template object handlers |
| | | * |
| | |
| | | { |
| | | // ignore |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Call a client method |
| | |
| | | $this->commands[] = $cmd; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Add a localized label to the client environment |
| | | */ |
| | |
| | | $this->texts[$name] = $this->app->gettext($name); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Invoke display_message command |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Delete all stored env variables and commands |
| | | */ |
| | |
| | | $this->texts = array(); |
| | | $this->commands = array(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Redirect to a certain url |
| | |
| | | exit; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Send an AJAX response to the client. |
| | | */ |
| | |
| | | $this->remote_response(); |
| | | exit; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Show error page and terminate script execution |
| | |
| | | $this->remote_response(); |
| | | exit; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Send an AJAX response with executable JS code |
| | |
| | | |
| | | echo self::json_serialize($response); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Return executable javascript code for all registered commands |