Class rcube_json_output

Description

View class to produce JSON responses

Located in /rcube_json_output.php (line 32)


	
			
Variable Summary
 mixed $ajax_call
 mixed $browser
 mixed $env
 mixed $type
Method Summary
 rcube_json_output __construct ([ $task = null])
 void add_handler (string $obj, string $func)
 void add_handlers (array $arr)
 void add_label ()
 void command (string 0, ... 1)
 string get_charset ()
 void redirect ([mixed $p = array()], [int $delay = 1])
 void remote_response ([string $add = ''], boolean 1)
 void reset ()
 void send ()
 void set_env (string $name, mixed $value)
 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 49)
  • access: public
mixed $browser (line 46)
  • access: public
mixed $env = array() (line 47)
  • access: public
mixed $type = 'js' (line 48)
  • access: public
Methods
Constructor __construct (line 55)

Constructor

  • access: public
rcube_json_output __construct ([ $task = null])
  • $task
add_handler (line 117)

Register a template object handler

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

Register a list of template object handlers

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

Add a localized label to the client environment

  • access: public
void add_label ()
command (line 141)

Call a client method

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

Get charset for output

  • return: Output charset
string get_charset ()
redirect (line 212)

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
remote_response (line 238)

Send an AJAX response with executable JS code

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

Delete all stored env variables and commands

  • access: public
void reset ()
send (line 223)

Send an AJAX response to the client.

  • access: public
void send ()
set_env (line 68)

Set environment variable

  • access: public
void set_env (string $name, mixed $value)
  • string $name: Property name
  • mixed $value: Property value
set_pagetitle (line 79)

Issue command to set page title

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

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

Documentation generated on Wed, 23 May 2012 16:40:51 +0200 by phpDocumentor 1.4.4