rhymix/classes/display/JSONDisplayHandler.php
ngleader aaecfe6097 r801fixed
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@8016 201d5d3c-b55e-5fd7-737f-ddc643e51545
2011-01-05 08:42:05 +00:00

12 lines
317 B
PHP

<?php
class JSONDisplayHandler {
function toDoc(&$oModule)
{
$variables = $oModule->getVariables();
$variables['error'] = $oModule->getError();
$variables['message'] = $oModule->getMessage();
$json = str_replace(array("\r\n","\n","\t"),array('\n','\n','\t'),json_encode2($variables));
return $json;
}
}