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,4 +1,8 @@
<?php
/** DomFramework
@package domframework
@author Dominique Fournier <dominique@fournier38.fr> */
/** Manage the configurations of the module done by administrator in a config
file
It is based on the module configuration defaults
@@ -11,11 +15,10 @@ $var = $config->get ("param");
*/
class config
{
public $default = array (); // All the parameters allowed with their default
// value
public $confFile = "./datas/configuration.php"; // Use the .php to protect
// the informations by adding a killing feature in
// the file
/** All the parameters allowed with their default value */
public $default = array ();
/** Use the .php to protect the informations */
public $confFile = "./datas/configuration.php";
/** List all the parameters configurable in the software */
public function params ()
@@ -24,8 +27,9 @@ class config
}
/** Get the value of the provided parameter recorded in .ini file
If it is not set in .ini file, use the default value */
/** Get the value of the provided parameter recorded in .php file
If it is not set in .php file, use the default value
@param string $param The option name to be returned */
public function get ($param)
{
if (!array_key_exists ($param, $this->default))
@@ -49,7 +53,9 @@ class config
}
/** Define a value for the parameter in the config file. Add all the default
values if they are not defined */
values if they are not defined
@param string $param The option name
@param mixed $value The option value */
public function set ($param, $value)
{
if (!array_key_exists ($param, $this->default))
@@ -82,6 +88,10 @@ class config
$this->confFile));
}
/** Display the $values in PHP format to be "require" easily
@param mixed $values Values to be recorded
@param string $phpcode Actual value of the php code
@param integer $indent Number of spaces in the indentation of config */
private function writePHP ($values, $phpcode, $indent)
{
foreach ($values as $key=>$val)