config : Add the '@prefix' support

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2164 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2015-05-11 13:34:01 +00:00
parent 81fbbb7da8
commit 2b92b68470

View File

@@ -243,6 +243,7 @@ class config
$foundDefault = "";
$parenthesis = 0;
$params = array ();
$path = "";
$group = dgettext("domframework", "Default parameters");
foreach ($tokens as $token)
{
@@ -260,8 +261,8 @@ class config
$text = trim (substr ($text, 3, -2));
$text = preg_replace ("/\n\s+/", " ", $text);
$text = preg_replace (
"/(@(param|description|type|values|default|group))/",
"\n\${1}", $text);
"/(@(param|description|type|values|default|group|prefix))/",
"\n\${1}", $text);
$text = ltrim ($text);
// Look at each parameter and save them in a data array
$data = array ();
@@ -289,6 +290,8 @@ class config
}
if (isset ($data["default"]))
$data["default"] = $this->strToType ($data["default"]);
if (isset ($data["prefix"]))
$data["prefix"] = $this->strToType ($data["prefix"]);
if ($debug) var_dump ($data);
$params[] = $data;
}
@@ -297,7 +300,9 @@ class config
{
if ($debug) echo "TEXT : $token\n";
if ($foundDefault !== "" && $token === "(")
{
$parenthesis++;
}
if ($foundDefault !== "" && $token === ")")
{
$parenthesis--;