From fd2d6252ff6589eb1d8c1db041c06b9b5695dc1d Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Thu, 15 Jun 2017 07:06:16 +0000 Subject: [PATCH] modelGenerator: use the titles and foreign methods instead of using the properties git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3776 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- tools/modelGenerator.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/modelGenerator.php b/tools/modelGenerator.php index bc14673..0d781f1 100755 --- a/tools/modelGenerator.php +++ b/tools/modelGenerator.php @@ -142,22 +142,22 @@ class modelGenerator } $f .= "\n"; $f .= " // The titles\n"; - $f .= " \$this->titles = array (\n"; + $f .= " \$this->titles (array (\n"; foreach ($schema["fields"] as $field=>$params) { $f .= " \"$field\" => _(\"$field\"),\n"; } - $f .= " );\n"; + $f .= " ));\n"; if (count ($schema["foreign"])) { $f .= "\n"; $f .= " // The foreign constraints\n"; - $f .= " \$this->foreign = array (\n"; + $f .= " \$this->foreign (array (\n"; foreach ($schema["foreign"] as $field=>$params) $f .= " \"$field\" => array (\n \"". implode ("\", \"", $params). "\"),\n"; - $f .= " );\n"; + $f .= " ));\n"; } $f .= " }\n";