Zikula_Core
[ class tree: Zikula_Core ] [ index: Zikula_Core ] [ all elements ]

Class: AjaxUtil

Source Location: /includes/pnobjlib/AjaxUtil.class.php

Class Overview


AjaxUtil


Author(s):

  • Frank Schummertz

Methods



Class Details

[line 20]
AjaxUtil



Tags:

author:  Frank Schummertz


[ Top ]


Class Methods


method error [line 32]

void error( [error $error = ''], [code $code = '400 Bad data'])

error()

Immediately stops execution and returns an error message




Tags:

author:  Frank Schummertz


Parameters:

error   $error   - error text
code   $code   - optional error code, default '400 Bad data'

[ Top ]

method output [line 56]

void output( args $args, [createauthid $createauthid = false], [xjsonheader $xjsonheader = false])

encode data in JSON and return This functions can add a new authid if requested to do so (default).

If the supplied args is not an array, it will be converted to an array with 'data' as key. Authid field will always be named 'authid'. Any other field 'authid' will be overwritten! Script execution stops here




Tags:

author:  Frank Schummertz


Parameters:

args   $args   - string or array of data
createauthid   $createauthid   - create a new authid and send it back to the calling javascript
xjsonheader   $xjsonheader   - send result in X-JSON: header for prototype.js

[ Top ]


Documentation generated on Fri, 18 Jul 2008 21:43:07 +0200 by phpDocumentor 1.4.1