Class rcmail_output_json

Description

View class to produce JSON responses

Located in /include/rcmail_output_json.php (line 29)

rcube_output
   |
   --rcmail_output
      |
      --rcmail_output_json
Variable Summary
 mixed $ajax_call
 mixed $callbacks
 mixed $commands
 mixed $message
 mixed $texts
 mixed $type
Method Summary
 void add_handler (string $obj, string $func)
 void add_handlers (array $arr)
 void add_label ()
 void command (string 0, ... 1)
 string get_js_commands ()
 void raise_error (int $code, string $message)
 void redirect ([mixed $p = array()], [int $delay = 1])
 void remote_response ([string $add = ''], boolean 1)
 void reset ()
 void send ()
 void set_pagetitle (string $title)
 void show_message (string $message, [string $type = 'notice'], [array $vars = null], [boolean $override = true], [int $timeout = 0])
Variables
mixed $ajax_call = true (line 37)
  • access: public

Redefinition of:
rcmail_output::$ajax_call
mixed $callbacks = array() (line 33)
  • access: protected
mixed $commands = array() (line 32)
  • access: protected
mixed $message = null (line 34)
  • access: protected
mixed $texts = array() (line 31)
  • access: protected
mixed $type = 'js' (line 36)
  • access: public

Redefinition of:
rcmail_output::$type

Inherited Variables

Inherited from rcmail_output

rcmail_output::$framed
rcmail_output::$object_handlers
rcmail_output::$pagetitle

Inherited from rcube_output

rcube_output::$app
rcube_output::$browser
rcube_output::$charset
rcube_output::$config
rcube_output::$env
Methods
add_handler (line 62)

Register a template object handler

  • access: public
void add_handler (string $obj, string $func)
  • string $obj: Object name
  • string $func: Function name to call

Redefinition of:
rcmail_output::add_handler()
Register a template object handler
add_handlers (line 73)

Register a list of template object handlers

  • access: public
void add_handlers (array $arr)
  • array $arr: Hash array with object=>handler pairs

Redefinition of:
rcmail_output::add_handlers()
Register a list of template object handlers
add_label (line 99)

Add a localized label to the client environment

  • access: public
void add_label ()

Redefinition of:
rcmail_output::add_label()
Add a localized label to the client environment
command (line 85)

Call a client method

  • access: public
void command (string 0, ... 1)
  • string 0: Method to call
  • ... 1: Additional arguments

Redefinition of:
rcmail_output::command()
Call a client method
get_js_commands (line 239)

Return executable javascript code for all registered commands

  • access: protected
string get_js_commands ()
raise_error (line 182)

Show error page and terminate script execution

  • access: public
void raise_error (int $code, string $message)
  • int $code: Error code
  • string $message: Error message

Redefinition of:
rcube_output::raise_error()
Show error page and terminate script execution
redirect (line 157)

Redirect to a certain url

void redirect ([mixed $p = array()], [int $delay = 1])
  • mixed $p: Either a string with the action or url parameters as key-value pairs
  • int $delay: Delay in seconds

Redefinition of:
rcube_output::redirect()
Redirect to a certain url.
remote_response (line 198)

Send an AJAX response with executable JS code

  • deprecated:
  • access: protected
void remote_response ([string $add = ''], boolean 1)
  • string $add: Additional JS code
  • boolean 1: True if output buffer should be flushed
reset (line 142)

Delete all stored env variables and commands

  • access: public
void reset ()

Redefinition of:
rcmail_output::reset()
Delete all stored env variables and commands
send (line 169)

Send an AJAX response to the client.

  • access: public
void send ()

Redefinition of:
rcube_output::send()
Send output to the client.
set_pagetitle (line 45)

Issue command to set page title

  • access: public
void set_pagetitle (string $title)
  • string $title: New page title

Redefinition of:
rcmail_output::set_pagetitle()
Setter for page title
show_message (line 121)

Invoke display_message command

  • access: public
  • uses: self::command()
void show_message (string $message, [string $type = 'notice'], [array $vars = null], [boolean $override = true], [int $timeout = 0])
  • string $message: Message to display
  • string $type: Message type [notice|confirm|error]
  • array $vars: Key-value pairs to be replaced in localized text
  • boolean $override: Override last set message
  • int $timeout: Message displaying time in seconds

Redefinition of:
rcube_output::show_message()
Invoke display_message command

Inherited Methods

Inherited From rcmail_output

 rcmail_output::__construct()
 rcmail_output::add_handler()
 rcmail_output::add_handlers()
 rcmail_output::add_label()
 rcmail_output::command()
 rcmail_output::get_skin_path()
 rcmail_output::reset()
 rcmail_output::set_pagetitle()

Inherited From rcube_output

 rcube_output::__construct()
 rcube_output::future_expire_header()
 rcube_output::get_charset()
 rcube_output::get_edit_field()
 rcube_output::get_env()
 rcube_output::json_serialize()
 rcube_output::nocacheing_headers()
 rcube_output::raise_error()
 rcube_output::redirect()
 rcube_output::reset()
 rcube_output::send()
 rcube_output::set_charset()
 rcube_output::set_env()
 rcube_output::show_message()
 rcube_output::__get()
Class Constants

Inherited Constants

Inherited from rcmail_output

rcmail_output::JS_OBJECT_NAME

Documentation generated on Fri, 03 May 2013 12:44:56 +0200 by phpDocumentor 1.4.4