Book a Demo

Author Topic: PHP code generation  (Read 2409 times)

FRot

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
PHP code generation
« on: September 24, 2014, 06:38:56 pm »
Dear EA experts,

I want to generate php source code out of a uml software description. So I created a Package in a model and the created two class diagrams. The one class diagram displays all abstract classes and their connections (aggregations). The other class diagram contains all the childs of the abstract classes which are connected by depencies. If I now press Tools>Source Code Engineering>Generate Package Source Code then I get some php-files with the abstract classes and some with the child classes which extend the parent classes. To this point everything works fine.

But now. When I start the php-script, I get an error because EA has added a "use ;" command on the header of each php-file which has an aggregation. So the empty "use" command creates a syntax error. How can I setup EA to leave off this "use" command, especially when nothing is following???

Then I deleted the "use" commands in every source code file by hand and tried again to run the code. Now I get another syntax error:
EA has added a body to every abstract method which is not allowed in php. So I have to delete all the bodies from the abstract methods by hand. So every changes in the software model in EA will cause some syntax errors which have to be fixed by hand. Is there any possibility to setup EA that it does not add a function body to abstract functions?

Thanks in advance,
Falk