Add all the phpdocs to the domframework

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1246 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2014-03-24 19:44:34 +00:00
parent 1b52b410c3
commit 350aa1dea8
28 changed files with 472 additions and 148 deletions

View File

@@ -1,12 +1,24 @@
<?php
/** DomFramework
@package domframework
@author Dominique Fournier <dominique@fournier38.fr> */
require_once ("output.php");
/** Display in JSOn the datas provided */
class outputjson extends output
{
public function out ($data)
/** Don't allow to output in JSON if the functions are not available in PHP */
function __construct ()
{
if (!function_exists ("json_encode"))
throw new Exception ("JSON support not available in PHP ! apt-get ".
"install php5-json", 500);
}
/** Display in JSOn the datas provided
@param mixed $data The data to be displayed */
public function out ($data)
{
@header("Cache-Control: no-store, no-cache, must-revalidate");
@header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
@header('Last-Modified: '.gmdate ('D, d M Y H:i:s').' GMT');