Zikula: A Flexible Open Source Content Management System
home | forum | international support | contact us

Docs For Class AjaxUtil

Class: AjaxUtil

Source Location: /pnobjlib/AjaxUtil.class.php

Class Overview


AjaxUtil

Author(s):

Methods


Inherited Variables

Inherited 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 ]

Packages:

Files:

Classes: