Revision: 3166
http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3166&view=rev
Author: hemna
Date: 2008-10-06 23:17:53 +0000 (Mon, 06 Oct 2008)
Log Message:
-----------
make sure we don't try and generate a get_id() in the child...it's final in the parent
Modified Paths:
--------------
trunk/phphtmllib/src/generator/DBDataObjectTemplateGenerator.inc
Modified: trunk/phphtmllib/src/generator/DBDataObjectTemplateGenerator.inc
===================================================================
--- trunk/phphtmllib/src/generator/DBDataObjectTemplateGenerator.inc 2008-10-06 23:13:26 UTC (rev 3165)
+++ trunk/phphtmllib/src/generator/DBDataObjectTemplateGenerator.inc 2008-10-06 23:17:53 UTC (rev 3166)
@@ -345,11 +345,16 @@
if (!in_array($field_name, $this->skip_field_functions)) {
$access_block .= str_replace(array('{FIELD}', '{FIELD_TYPE}'),
- array($field_name, $this->convert_to_php_type($col['db_field_type'])), $access_block_set);
+ array($field_name, $this->convert_to_php_type($col['db_field_type'])), $access_block_set);
}
+
+ //we can't override get_id, as it's final.
+ if ($field_name != "id") {
+ $access_block .= str_replace(array('{FIELD}', '{FIELD_TYPE}'),
+ array($field_name, $this->convert_to_php_type($col['db_field_type'])), $access_block_get);
+ }
- $access_block .= str_replace(array('{FIELD}', '{FIELD_TYPE}'),
- array($field_name, $this->convert_to_php_type($col['db_field_type'])), $access_block_get);
+
$to_string_block .= '" '.$field_name.' = ". $this->get_'.$field_name.'(). ';
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|