make sure parent constructors are called in php
authorkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Tue, 6 Jul 2010 20:00:31 +0000 (20:00 +0000)
committerkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Tue, 6 Jul 2010 20:00:31 +0000 (20:00 +0000)
git-svn-id: https://silmor.de/svn/softmagic/pack/trunk@532 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33

woc/phpout.cpp

index 42675c8..211bc0a 100644 (file)
@@ -18,7 +18,7 @@
 static const QByteArray PHPSTART("<?\n//THIS IS AN AUTOGENERATED FILE, DONT CHANGE!\n\n");
 static const QByteArray PHPEND("\n//END OF AUTOGENERATED FILE\n?>");
 
-static const QByteArray SCHEMASTART("class WobSchema extends WobSchemaBase\n{\nfunction __construct(){\n");
+static const QByteArray SCHEMASTART("class WobSchema extends WobSchemaBase\n{\nfunction __construct(){\n\tparent::__construct();\n");
 static const QByteArray SCHEMAEND("}};\n");
 
 static const QByteArray TRANSACTCLASS("class WobTransaction extends WobTransactionBase\n{\n");
@@ -367,10 +367,10 @@ QString WocPHPServerOut::classConstruct(const WocClass&cls)
                if(!cls.propertyIsList(k[i]))code+="=null";
                code+=";\n";
        }
-       code+="public function __construct()\n{\n";
+       code+="public function __construct()\n{\n\tparent::__construct();\n";
        for(int i=0;i<k.size();i++)
                if(cls.propertyIsList(k[i]))
-                       code+="\t$this->prop_"+k[i]+"=array();";
+                       code+="\t$this->prop_"+k[i]+"=array();\n";
        code+="}\n";
        return code;
 }