mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-04 13:55:02 +01:00
66 lines
1.3 KiB
PHP
66 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* EGroupware API: JSON - Contains functions and classes for doing JSON requests.
|
|
*
|
|
* @link http://www.egroupware.org
|
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
|
* @package api
|
|
* @subpackage ajax
|
|
* @author Andreas Stoeckel <as@stylite.de>
|
|
* @version $Id$
|
|
*/
|
|
|
|
use EGroupware\Api\Json;
|
|
|
|
/**
|
|
* Class handling JSON requests to the server
|
|
*
|
|
* @deprecated use Api\Json\Request
|
|
*/
|
|
class egw_json_request extends Json\Request {}
|
|
|
|
/**
|
|
* Class used to send ajax responses
|
|
*/
|
|
class egw_json_response extends Json\Response
|
|
{
|
|
/**
|
|
* xAjax compatibility function
|
|
*/
|
|
public function printOutput()
|
|
{
|
|
// do nothing, as output is triggered by egw::__destruct()
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Deprecated legacy xajax wrapper functions for the new egw_json interface
|
|
*
|
|
* @deprecated use Api\Json\Response methods
|
|
*/
|
|
class xajaxResponse
|
|
{
|
|
public function __call($name, $args)
|
|
{
|
|
if (substr($name, 0, 3) == 'add')
|
|
{
|
|
$name = substr($name, 3);
|
|
$name[0] = strtolower($name[0]);
|
|
}
|
|
return call_user_func_array(array(egw_json_response::get(), $name), $args);
|
|
}
|
|
|
|
public function addScriptCall()
|
|
{
|
|
$args = func_get_args();
|
|
$func = array_shift($args);
|
|
|
|
return call_user_func(array(egw_json_response::get(), 'apply'), $func, $args);
|
|
}
|
|
|
|
public function getXML()
|
|
{
|
|
return '';
|
|
}
|
|
}
|